Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Approval Reminder UI Action on group approval form

Community Alums
Not applicable

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.

 

AnkitaGupte_0-1705407768224.png

 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

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]

****************************************************************************************************************

Tushar
Kilo Sage
Kilo Sage

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

Community Alums
Not applicable

Hi Tushar,

 

I have created UI action as per above but email is not triggering

AnkitaGupte_0-1705494353071.png

The UI action has been applied on group approval table

AnkitaGupte_1-1705494462570.png

Event created by approval.reminder and below are email SS

Email notification applied on group approval table

AnkitaGupte_2-1705494606558.png

AnkitaGupte_3-1705494625985.png

Please advice.