You need to sign in to do that
Don't have an account?

Visual Flow before events vs Apex trigger before events
Hi Everyone,
I have the following scenario:
Update the Status__c field when Is_Active__c field value is changed.
Which is the best approach either using apex trigger or visual flows.
Thanks in advance.
Sreenivasulu A
I have the following scenario:
Update the Status__c field when Is_Active__c field value is changed.
- As of now, we are using an apex trigger to update the field by comparing trigger.old and trigger.new values.
- If wanted to use the visual flow, I have to get the old value from database and compare it with the new value.
- It may cause another SOQL query.
Which is the best approach either using apex trigger or visual flows.
Thanks in advance.
Sreenivasulu A
I recommend checking the Sample Scenarios section in this Trailhead module
If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
Anudeep
All Answers
I recommend checking the Sample Scenarios section in this Trailhead module
If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
Anudeep
Thanks for your quick reply. It is helpful for me.
Updating through process builder will be one more DML operation and It causes to fire the assignment rules, auto-response rules, workflow rules, and other customizations once again.
Because of that, I wanted to update the field values before performing the DML (in before triggers or flows).
Thanks,
Sreenivasulu A.