nerdexam
Salesforce

CRT-450 · Question #227

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…

The correct answer is A. Change the gerAssetsToUpdac= method to process all Accounts in one call and call it outside of. See the full explanation below for the reasoning.

Question

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?

Exhibit

CRT-450 question #227 exhibit

Options

  • AChange the gerAssetsToUpdac= method to process all Accounts in one call and call it outside of
  • BAdd a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an
  • CMove all of the logic to a Queueable class that queries for and updates the Assets and call it from
  • DAdd List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to

How the community answered

(54 responses)
  • A
    85% (46)
  • B
    6% (3)
  • C
    7% (4)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice