[Notifications] How to create notifications/reminder to users with a specific role?

John Clyde Ap_a
Giga Expert

Hello, how can I create a notification/reminder to users with a specific role? Can someone please guide me on how to set it up?

My main requirement is just to create a notification/reminder to each manager to check and update the drinks table. 

There are no other prerequisites for it, its just to notify the manager every week or so.

 

How can I achieve this?

1 ACCEPTED SOLUTION

Mohith Devatte
Tera Sage
Tera Sage

Hello @John Clyde Ap[as ,

you can do it like this if its a weekly process 

1) Create a event in event register table 

find_real_file.png

2)Create a scheduled job where you can call your event and set your scheduled job to run weekly once at your required time with this script of your requirement and trigger the event 

var gr= new GlideRecord('your_drink_table');
gr.addQuery('<fieldname>','<value>'); //. add your query 
gr.query();
if(gr.next())
    {
        gs.eventQueue('your_event_name',gr,'','');
    }

find_real_file.png

 

3)Then use this event in the notification and in whom to send select your manager as the recepient

find_real_file.png

PLEASE MAK MY ANSWER CORRECT IF IT HELPS YOU

View solution in original post

21 REPLIES 21

@Mohith Devatte 
I am looking for either "Business Rule" or "Flow Designer" to send email reminders to approvers for every 24 hours up to 5 days when RITM created , On 5th day still no action taken by approver RITM should update with auto closed incomplete. Could you assist with this ?

ShubhamGarg
Kilo Sage

Hi John,

To send email notification to a specific role, don't forget to add below block of code to your script tp what advised above-

if (userObj.hasRole('incident_manager')) {
     <put here your code>

     }
     else {

     }

Mark this as Helpful if it helps.

Regards,

Shubham