Question 156

From which 2 locations can a developer determine the overall code coverage for a sandbox?
  • Question 157

    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?
  • Question 158

    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 159

    A developer creates a custom controller and a custom Visualforce page by using the code block below:
    public class MyController {
    public String myString {
    get {
    if (myString == null) { myString = 'a';
    }
    return myString;
    } private set; } public string getMyString (){
    return 'getMyString';
    } public string getStringMethod () {
    if (myString == null) {
    myString = 'b';
    } return myString;
    }
    } <apex:page controller = "MyController"> {!StringMethod}, {!myString}, {!myString} </apex:page> What can the user expect to see when accessing the custom page?
  • Question 160

    Which two are phases in the Aura application event propagation framework? Choose 2 answers