Approval Reminder UI Action on group approval form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 04:24 AM
Hi Experts,
I want to configure approval reminder UI action on group approval form, so when we click on that whoever is group member of that approval group should trigger approval reminder email. So here the approval group is populated in assignment group on group approval table. So the member in this assignment group should get notification. Also I would like to enable audit record for this table. Kindly advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 04:27 AM
Hi @Community Alums
Why need to trigger reminder manually, when this can be done via Flow.
In flow designer, create a schedule and look for the record where approval is not done in last 3 days and send notification.
You will get this flow on community easily.
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-16-2024 04:36 AM
Hi @Community Alums
Create a UI Policy with following script -
var groupSysId = current.assignment_group;
// checking if assignment_group field is populated
if (groupSysId) {
var groupMembers = new GlideRecord('sys_user_grmember');
groupMembers.addQuery('group', groupSysId);
groupMembers.query();
// checking if there are group members
if (groupMembers.hasNext()) {
while (groupMembers.next()) {
// use eventQueueWithErrorHandling to handle errors during event queue processing
gs.eventQueueWithErrorHandling('approval.reminder', groupMembers.user, 'Approval Reminder Event');
}
gs.addInfoMessage('Approval reminder sent to group members.');
} else {
gs.addInfoMessage('No group members found for the specified group.');
}
} else {
gs.addErrorMessage('Assignment group is not specified. Please populate the assignment group field.');
}
- Now Create a new event with the name "approval.reminder." and Create a new notification to be sent to group members when the "approval.reminder" event is triggered.
In the Table form, check the box for "Audit" to enable auditing for the table and you can also configure the audit fields based on your requirements.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 04:30 AM
Hi Tushar,
I have created UI action as per above but email is not triggering
The UI action has been applied on group approval table
Event created by approval.reminder and below are email SS
Email notification applied on group approval table
Please advice.
