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
6 months agoBurma
6 months agoCornell
7 months agoGail
7 months agoElke
7 months agoJacki
7 months agoRonnie
8 months agoLashawn
8 months agoRessie
8 months agoMaxima
8 months agoDenae
8 months agoBulah
8 months agoAnnalee
8 months agoMadalyn
8 months agoWilda
8 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