- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:00 AM
Hi Community,
My requirement is quite simple but still bit confused.
1. A approval reminder should be triggered after 2 days i.e. on 3rd day if no action is taken.
2. The approval should trigger after 2 days i.e. on 3 day and still no action is taken then again wait for 2 days and then trigger notification on 5th day. Preferable approach currently I'm following is of scheduled job.
In approval table I'm trying to build a condition but it's not correct.
Any help would be deeply appreciated.
Thank You,
Sujay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:19 AM
Then give a try to flow designer as I mentioned. You can build this without code.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:04 AM
Hi,
Can you please share your script?
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 05:49 AM
Hi,
Your are using addQuery() here, you need to use addEncodedQuery();
var approvalGR = new GlideRecord('sysapproval_approver');
approvalGR.addEncodedQuery('sys_created_onRELATIVEGT@dayofweek@ago@3^sys_created_onRELATIVELT@dayofweek@ago@3^state=requested'); // previously it was approvalGR.addQuery()
approvalGR.query();
while (approvalGR.next()) {
gs.eventQueue('sn_lg_stock_cp.approval_reminder_itp', approvalGR, approvalGR.approver);
approvalGR.comments = 'Reminder notification sent to approver.';
approvalGR.update();
}
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:10 AM
How you are recording NO Action is taken? On which table you want to set this notifications.
Create Flow
Action
Look up record
Condition --> No action taken
Loop
For each
Wait for 2/5 days
Notification
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************