Auto approve the requests after 7 days if not approved using workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 10:11 AM
Hi, I have a requirement to auto approve the approval requests after 7 days if not approved. Please let me know if anyone has any idea.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 12:30 PM
Hi @Kumar437 ,
Use timer activity in workflow timer duration for 7 days, Connect timer activity to approval activity if approval not approved after 7 days connect to script activity and approve approval.
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 12:41 PM
Hi @Kumar437 ,
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
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda