CERTIFICATION PREPARATION : SALESFORCE PLATFORM DEVELOPER I


PD1 Certification Preparation

1. Why would a developer use Test.startTest() and Test.stopTest() ? 
A. To avoid Apex code coverage requirements for the code between these lines 
B. To start and stop anonymous block execution when executing anonymous Apex code. 
C. To indicate test code so that it does not impact Apex line count governor limits 
D. To create an additional set of governor limits during the execution of a single test class.

2. What must the Controller for a Visulforce page utilized to override the standard Opportunity view button?
A. The StandardSetController to support related lists for pagination 
B. The Opportunity StandardController for pre-built functionality 


C. A callback constructor to reference the StandardController 
D. A constructor that initialized a private Opportunity variable.

3. A developer uses a before insert Trigger on the Lead object to fetch the Territory__c object, where the Territory.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10000 Lead records. The developer has the following code block: 

for(Lead l : Tigger.new)
 { 
       if(l.PostalCode != null) 
      { 
        List< Territory__c> terrList = 
                                [ SELECT Id FROM Territory__c where PostalCode__c =: lo.PostalCode ];  
        if(terrList.size() > 0) 
        {
          l.Territory__c = terrList[0].id; 
        } 
     }
 }

Which line of code is causing the code block to fail? 
A. 03: A SQOL query is located inside of the for loop code. 
B. 01: Trigger.new is not valid in a before insert Trigger. 
C. 02: A NullPointer exception is thrown if PostalCode is null. 
D. 05: The Lead in the before insert trigger cannot be updated.

4. What would a developer do to update a picklist field on a related Opportunity records when a modification to the associated Account record is detected?
A. Create a process with a process builder. 
B. Create a Workflow Rule with a field update. 
C. Create a Lightning component. 
D. Create a Visualforce page.

5. Which requirement needs to be implemented using standard workflow instead of Process Builder? Choose 2 answers


A. Create activities at multiple intervals 
B. Send outbound message without Apex code 
C. Copy an account address to its contacts 
D. Submit a contract for approval

No comments:

Post a Comment