PrepAway - Latest Free Exam Questions & Answers

A developer encounters APEX heap limit errors in a trigger.

A developer encounters APEX heap limit errors in a trigger.

Which two methods should the developer use to avoid this error? (Choose two.)

A. Use the transient keyword when declaring variables.

B. Query and store fields from the related object in a collection when updating related objects.
C. Remove or set collections to null after use.

D. Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.


Leave a Reply