PDI Exam Question 81

Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
  • PDI Exam Question 82

    To which primitive data type in Apex is a currency field atomically assigned?
  • PDI Exam Question 83

    A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic?
  • PDI Exam Question 84

    Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?
  • PDI Exam Question 85

    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?