Workflows auto approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 10:52 AM - edited 11-17-2022 10:55 AM
Once the request is submited and approval will get trigger , if the approver is on not approved for 2 days then i need to auto approve the request and it will trigger the next level approval once it is auto approved .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 11:09 AM
hello @sushma9 not sure if this would work but give it a try
1)After your approval activity use a timer activity and keep it as 2 days in duration
2)Then add an if activity saying if still the approval is in requested state with advanced script like below
// This script needs to set answer to 'yes' or 'no' to indicate the state of the activity.
//
// For example,
//
answer = ifScript();
function ifScript() {
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval',current.sys_id);
gr.addQuery('state','requested');
gr.query();
if(gr.next())
{
return 'yes';
}
return 'no';
}
3)After that use a approval action activity which says mark task approved
Again not sure if this works i just thought of an idea but yeah give it a try and let me know
If it works please mark my answer correct
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 01:43 AM
HiMohit ,
Its not working