Question 41

What are two use cases for executing Anonymous Apex code? Choose 2 answers
  • Question 42

    A developer uses an 'after update' trigger on the Account object to update all the Contacts related to the Account. The trigger code shown below is randomly failing.
    List<Contacts> theContacts = new List<Contacts>(); for(Account a : Trigger.new){ for(Contact c : [SELECT Id, Account_Date__c FROM Contact WHERE AccountId = :a.Id]){ c.Account_Date__c = Date.today(); theContacts.add(c);
    }
    } updates theContacts;
    Which line of code is causing the code block to fail?
  • Question 43

    What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers
  • Question 44

    A developer has to Identify a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database. Which two techniques should the developer implement as a best practice to esure transaction control and avoid exceeding governor limits? Choose 2 answers
  • Question 45

    The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a workflow field update, which changes the value of the number field to 11. After the workflow field update, an update trigger fires.What is the value of the number field of the object that is obtained from Trigger.old?