Question: 1
What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components?
Choose 3 answers
Question: 2
How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }
Question: 3
A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } }
The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?
Question: 4
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers
Question: 5
Given the following trigger implementation:
trigger leadTrigger on Lead (before update){
final ID BUSINESS_RECORDTYPEID = '012500000009Qad';
for(Lead thisLead : Trigger.new){
if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){
thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;
}
}
}
The developer receives deployment errors every time a deployment is attempted from Sandbox to Production.
What should the developer do to ensure a successful deployment?