- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2022 07:18 AM
I am really need of some expert suggestions.
User want to have notifications for the current assigned approver(s) of requests sent every 5 days until the approver responds to the request or the ticket is closed.
Workflow:
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 05:23 AM
Hi,
Please find the steps below to achieve your requirement:
1) Navigate to "Registry" module and create a event as below:
2) Select table as sysapproval_approver as shown below:
3) Navigate to the module "Scheduled Job" under System Definition and select Automatically run a script and use the script below:
Script for reference:
sendNotif();
function sendNotif(){
var gr = new GlideRecord('sysapproval_approver');
gr.addEncodedQuery('state=requested^sys_created_onRELATIVELT@dayofweek@ahead@5^source_table=sc_req_item'); // Replace "sc_req_item" with the Table for which you want to trigger notification
gr.query();
while(gr.next()){
gs.eventQueue('send.notif',gr,gr.approver); // "send.notif is the Event name configured in step 1. Also, "gr.approver" replace it with the recipient to whom you want to trigger.
}
}
Scheduled Job Frequency:
Now finally configure your notification and make sure to make it event based and check the parameter "parm1 and send to event creator as tru as shown below:
Notification will be on Approval table:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 05:23 AM
Hi,
Please find the steps below to achieve your requirement:
1) Navigate to "Registry" module and create a event as below:
2) Select table as sysapproval_approver as shown below:
3) Navigate to the module "Scheduled Job" under System Definition and select Automatically run a script and use the script below:
Script for reference:
sendNotif();
function sendNotif(){
var gr = new GlideRecord('sysapproval_approver');
gr.addEncodedQuery('state=requested^sys_created_onRELATIVELT@dayofweek@ahead@5^source_table=sc_req_item'); // Replace "sc_req_item" with the Table for which you want to trigger notification
gr.query();
while(gr.next()){
gs.eventQueue('send.notif',gr,gr.approver); // "send.notif is the Event name configured in step 1. Also, "gr.approver" replace it with the recipient to whom you want to trigger.
}
}
Scheduled Job Frequency:
Now finally configure your notification and make sure to make it event based and check the parameter "parm1 and send to event creator as tru as shown below:
Notification will be on Approval table:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2024 01:32 AM
Hi @shloke04,
Can you please make me understand your condition that you have written in scheduled job.
gr.addEncodedQuery('state=requested^sys_created_onRELATIVELT@dayofweek@ahead@5^source_table=sc_req_item');
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2025 11:39 PM
Hi @shloke04 ,
Can you please guide me, I have a same kind of requirement, where i need to trigger notification in regular interval of time for every 5 years until the ticket is closed based on the Date present in the Custom field Test Date. I have followed every step, but in scheduled job i'm not able to set 1826 days periodically can you please help how can i solve this.
Field type - Date
Field Name - TEST DATE (u_test_date)
Event name- Test Date
For Example: If the date present on TEST DATE field is 9-Jan-2025, i want notification to be triggered for respective few people every 5 years for 2030, 2035, 2040 ... until its moved to Closed state. The date on TEST DATE will remain same i.e. 9-Jan-2025. The Test date will vary for every ticket.
Thanks in advance.