Salesforce PDI Exam (page: 14)
Salesforce Certified Platform Developer I
Updated on: 06-Aug-2025

Viewing Page 14 of 77

A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) { //exception
handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

  1. Database.insert(propertiesToCreate, false);
  2. insert propertiesToCreate;
  3. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);
  4. Database.insert(propertiesToCreate);

Answer(s): A



hat are three techniques that a developer can use to invoke an anonymous block of code? Choose 3 answers

  1. Create a visualforce page that uses a controller class that is declared without sharing
  2. Type code into the developer console and execute it directly
  3. Type code into the execute anonymous tab in the force.com IDE and click execute
  4. Use the SOAP API to make a call to execute anonymous code
  5. Create and execute a test method that does not specify a runas() call

Answer(s): B,C,D



A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug('
NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

  1. List Exception
  2. NullPointer Exception
  3. Generic Exception
  4. No message is logged

Answer(s): B



A developer uses a test setup method to create an account named 'test'. The first method deletes the account record. What must be done in the second test method to use the account?

  1. Use select id from account where name='test'
  2. Restore the account using an undelete statement
  3. Call the test setup method at the start of the test
  4. The account cannot be used in the second method

Answer(s): A



Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?

  1. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.
  2. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.
  3. The Custom Object will be deleted when the referenced Standard Object is deleted.
  4. The Custom Object inherits security from the referenced Standard Objects

Answer(s): C



Viewing Page 14 of 77



Share your comments for Salesforce PDI exam with other users:

TestPD1 8/10/2023 12:22:00 PM

question 18 : response isnt a ?
EUROPEAN UNION


TestPD1 8/10/2023 12:19:00 PM

question 17 : responses arent b and c ?
EUROPEAN UNION