How to return a different workflow status from the approval

Posted by Ruben Dröge on 15-Aug-2016 08:27

At this moment it seems that whatever I do, once I approve (using the approval app) an object, it always puts my source object to status 'Approved' (or any other workflow status with integration code $APPROVED). Is there a way to influence the status coming from the Approval app?
My objects workflow will have multiple approval steps and I want to be able to set my objects status to 'Approved by PM' / 'Approved by PL' according to the steps of my workflow/approval.

Do I need to create multiple 'Approval status pages' and link those to my Approval actions first and then add scripting to those pages' submit actions to change the workflow status of my source object?

Posted by Ruben Dröge on 16-Aug-2016 07:26

I was able to achieve what I wanted by creating an extra field in my source object called 'Workflow status old' that is being filled with the previous workflow status by a before update trigger (of type object script).

Next to that I created after update triggers (of type Change workflow status) that fire conditionally based on 'Workflow status old' and 'Workflow status' (=Approved) to update the Workflow status field with my custom status.

All Replies

Posted by Ruben Dröge on 16-Aug-2016 07:26

I was able to achieve what I wanted by creating an extra field in my source object called 'Workflow status old' that is being filled with the previous workflow status by a before update trigger (of type object script).

Next to that I created after update triggers (of type Change workflow status) that fire conditionally based on 'Workflow status old' and 'Workflow status' (=Approved) to update the Workflow status field with my custom status.

This thread is closed