Free Salesforce PDI Exam Braindumps (page: 18)

An apex trigger fails because it exceeds governor limits. Which two techniques should a developer use to resolve the problem? Choose 2 answers

  1. Use the database class to handle DML operations
  2. Use maps to reference related records
  3. Use SOQL aggregate queries to retrieve child records
  4. Use lists for all DML operations

Answer(s): B,D



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






Post your Comments and Discuss Salesforce PDI exam prep with other Community members:

PDI Exam Discussions & Posts