Valid PDII Dumps shared by EduDump.com for Helping Passing PDII Exam! EduDump.com now offer the newest PDII exam dumps, the EduDump.com PDII exam questions have been updated and answers have been corrected get the newest EduDump.com PDII dumps with Test Engine here:
trigger AssignOwnerByRegion on Account ( before insert, before update ) { List<Account> accountList = new List<Account>(); for( Account anAccount : trigger.new ) { Region__c theRegion = [ SELECT Id, Name, Region_Manager__c FROM Region__c WHERE Name = :anAccount.Region_Name__c ]; anAccount.OwnerId = theRegion.Region_Manager__c; accountList.add( anAccount ); } update accountList; } Consider the above trigger intended to assign the Account to the manager of the Account's region. Which two changes should a developer make in this trigger to adhere to best practices? (Choose two.)
Correct Answer: B,C
Recent Comments (The most recent comments are at the top.)
Tejaswini Honkali - Oct 14, 2023
Option A and D is a correct answer as an update is not required on before trigger and the query should be moved out of for loop as it's not a best practice.
Recent Comments (The most recent comments are at the top.)
Option A and D is a correct answer as an update is not required on before trigger and the query should be moved out of for loop as it's not a best practice.