Salesforce DEX-450 Exam - Topic 4 Question 100 Discussion
A developer deployed a trigger to update the status__c of Assets related to an Account when the Account''s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?
A) Change the gerAssetsToUpdac= method to process all Accounts in one call and call it outside of the for loop that starts on line 03.
B) Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.
C) Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger.
D) Add List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to line 14 and iterate over the assets list in the for loop on line 15.
Dulce
9 months agoBurma
10 months agoCornell
10 months agoGail
10 months agoElke
10 months agoJacki
10 months agoRonnie
11 months agoLashawn
11 months agoRessie
11 months agoMaxima
11 months agoDenae
11 months agoBulah
11 months agoAnnalee
11 months agoMadalyn
11 months agoWilda
11 months agoSolange
2 years agoTegan
2 years agoJess
2 years agoJina
2 years agoColette
2 years agoSherita
2 years agoAgustin
2 years agoKrystina
2 years agoGeraldine
2 years agoBlair
2 years agoJosephine
2 years agoBernadine
2 years agoMarcelle
2 years agoMarjory
2 years agoVicky
2 years agoPrecious
2 years agoLeigha
2 years agoViola
2 years agoDino
2 years agoCheryl
2 years agoBrittani
2 years ago