A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:
C is correct. You don't make a DML statement in a before trigger as it gets implicitly updated after the trigger ends. The before trigger runs before the DML operation. https://www.sfdcpoint.com/salesforce/apex-trigger-in-salesforce/
Although there are many typos in the example which would prevent the code from saving / running.
c, since DML stmt is inside for loop and can cause limit exception.
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
venkatasunilr
Highly Voted 4 years, 1 month agoryuu
Highly Voted 3 years, 4 months agoirina_735
Most Recent 1 year, 2 months ago1vanTT
1 year, 6 months agoInfoash
4 years, 1 month agoam1
4 years, 6 months ago