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

Question: Trigger on Approved record in approval process
Hi,
Is it possible to have a trigger only fire on a record that is approved at the end of an approval process?
I have an after update trigger that does some cascading updates on associated child records. Now we want to introduce an approval process and only have the child updates happen on final approval of the change.
As I have not worked with approval processes before any help will be much appreciated.
Hi,
Have worked on something like this before. the case was, there was an approval process set for 'rate card' to be approved by a sales manager so that if he approves the same, a pricebook with all the entries of the rate card will be created.
see the process would something be as follows:
1. create a custom field on that object. name the field as 'isApproved'
2. create an approval process, and in that a 'field update' workflow such that whenever the process gets approved the workflow makes the 'isApproved' field 'true'.
3.so now, the field is updated..that means the record is updated.
4. create an 'after update' trigger for the record and make sure the trigger fires when:
a) when the 'isApprove' is true
b) after update
5. now the trigger would be fired and hopefully your functionality would be achieved.
All Answers
Hi,
Have worked on something like this before. the case was, there was an approval process set for 'rate card' to be approved by a sales manager so that if he approves the same, a pricebook with all the entries of the rate card will be created.
see the process would something be as follows:
1. create a custom field on that object. name the field as 'isApproved'
2. create an approval process, and in that a 'field update' workflow such that whenever the process gets approved the workflow makes the 'isApproved' field 'true'.
3.so now, the field is updated..that means the record is updated.
4. create an 'after update' trigger for the record and make sure the trigger fires when:
a) when the 'isApprove' is true
b) after update
5. now the trigger would be fired and hopefully your functionality would be achieved.