How to trigger notification if user added admin role using business rule

Debarpita
Tera Contributor

Hi All,

 

How to trigger notification if user added admin role using business rule? Kindly help me 

1 ACCEPTED SOLUTION

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Debarpita ,

Create a BR as below :-

GunjanKiratkar_0-1669792008827.png

 

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	gs.eventQueue('event.name', GlideRecord, parm1, parm2); // standard form


})(current, previous);

 

 

Create event from event registry and then create the BR.

After that create one notification as when event triggered and mentioned that event there.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

12 REPLIES 12

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Debarpita ,

Create a BR as below :-

GunjanKiratkar_0-1669792008827.png

 

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	gs.eventQueue('event.name', GlideRecord, parm1, parm2); // standard form


})(current, previous);

 

 

Create event from event registry and then create the BR.

After that create one notification as when event triggered and mentioned that event there.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

not working created br, event registry and notification 

in br  after insert, roles is admin , script : gs.eventQueue('bpo.group.role.alert.event', GlideRecord, '', '');

notification : event is fired , with or without filter condition : role is admin, user my email id

 

 

Call event as below :-

gs.eventQueue('bpo.group.role.alert.event',current,gs.getUserName(),gs.getUserID()); 

Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

thanks alot