Need help on configuring multi level approval notification trigger should be previous approvers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 04:29 AM
I have below requirement.
we have multi level approval for our request.
requestor submit request,
Requestor gets notification,
then Requestor manager need to approve the request
then Requestor department manager need to get approval request
at any point of time anyone rejects the approval the requestor and previous approver should get notification.
How to configure Hierachy of approvals in optimised way. instead of triggering each phase notification want to configure at one place.
Any suggesions please share.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 09:52 AM
Hello @Are Kaveri ,
To achieve this requirement you can update the workflow in which you are triggering approver, If approval is rejected then add Run Script activity in that use gs. event queue to call event and trigger notification based on the event, In event pass the parameter as previous approval. Kindly let me know of there is any questions.
Please mark this as the correct answer and helpful if it is resolved, or mark this helpful if this helps you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 10:11 AM
can you please give me one example for Run script. in gs.eventqueue with parameters. like how to add previous approver?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 11:55 AM - edited 09-02-2023 11:55 AM
Hello @Are Kaveri ,
Please find below mentioned example and script to run script.
Script:
var temp='';
var gr=new GlideRecord('sysapproval_approver');
gr.addEncodedQuery('sysapproval='+current.sys_id);
gr.query();
while(gr.next()){
temp=gr.approver+',';
}
gs.eventQueue('your_event_name',current,temp);
Please mark this as the correct answer and helpful if it is resolved, or mark this helpful if this helps you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2023 11:32 PM - edited 09-03-2023 11:34 PM
I am working on custom table and approvals triggers on my custom table.
when i tried above script it was not even executing . My notification is not even triggered any mistake i was doing not understanding