Big 11.11 Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Exam PDI All Questions
Exam PDI All Questions

View all questions & answers for the PDI exam

Salesforce Developers PDI Question # 33 Topic 4 Discussion

PDI Exam Topic 4 Question 33 Discussion:
Question #: 33
Topic #: 4

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.

PDI Question 33

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?


A.

Move all of the logic to a Queveable class that queries for and updates the Assets and call it from the trigger.


B.

Add List<asset> assets = [SELECT id, Status_¢ FROM WHERE AccountId = : acctId] to line 14 and iterate over the assets list in the for loop on line 15.;


C.

Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.


D.

Change the getAssetsToUpdate method to process all Accounts in one call and call it outside of the for loop that starts on line 03.


Get Premium PDI Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.