Workflow Rule Field Update and Trigger.old Consideration | Apex | Salesforce
We have a functionality that tracks how many times a
stage has changed for an Opportunity, using a workflow rule which is fired to increment the value of a number field.
However, there is an after trigger to create a child record when the field changes from 4 to
5.
A user
changes the stage of an Opportunity and manually sets the count field to 4. The
count field updates to 5. But the child record is not created.
Consideration: If a workflow rule field update is triggered by a record update, Trigger.old doesn’t hold the newly updated field by the workflow after the update.
For further details, click here for the reference article.
Please share your feedback or comments or queries related to this post, on below comment section.
Hashtags - #sfdcsasid #sfdc #sasid #salesforce #workflow #fieldupdate #trigger #triggerold #apex
Comments
Post a Comment