Salesforce Certified Platform Developer I Exam Questions With Answers

1. Why would a developer use system.startTest and System.stopTest methods?
A. To avoid Apex code coverage requirements for 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 Visualforce page utilize to override the standard Opportunity view button?
A. The StandardSetController to support related lists for pagination.
B. The opportunity Standard Controller for pre-built functionality.
C. A callback constructor to reference the Standard Controller.
D. A constructor that initializes 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__c.Postalcode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10000 Load records. The developer has the following code block:
for(Lead l : Trigger.new)
{
if(l.PostalCode != null)
{
List<Territory__c> terrList = [Select Id From Territory__c where PostalCode__c = : l.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 SOQL query is located inside of the for loop code.
B.01.Trigger.new is not valid in a before insert Trigger.
C.02.A Null Pointer exception exception is thrown if Postal Code is null.
D.05.The Lead in a before insert trigger cannot be updated.

4. What would a developer do to update a pick list field on related Opportunity records when a modification to the associated Account record is detected?
A. Create a process with Process Builder.
B. Create a workflow rule with a field update.
C. Create a Lightening Component.
D. Create a Visualforce page.

5.Which requirement needs to be implemented by using standard workflow instead of process builder?
Choose 2 answers

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

     For Answers Click Here.                                            Click here for Next Page.

Related posts