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.

Escalate button to send the notification from incident

Learn SN
Tera Contributor

Hi Experts,

 

I have a button ( UI ACTION) called escalate on incident form. I want that when i click that escalate button, escalation email goes to assigned to 's manager and assignment group's manager.

Can someone help me achieving this ?

 

Thanks!

 

1 ACCEPTED SOLUTION

OK, if you want a popup you'll need to go to the client but you can still show an info message with the server:

gs.eventQueue('escalate_incident', current, current.assigned_to.manager, current.assignment_group.manager);
gs.addInfoMessage("Your incident is escalated");
action.setRedirectURL(current);

View solution in original post

14 REPLIES 14

Hi Paul,

 

I want subject to contain escalated incident as well

 

Thanks!

Because you're passing through the current object you can access all the fields on the incident as you normally would in a notification.

Learn SN
Tera Contributor

Hi Paul,

 

I also want to show a message on incident form that "Your incident has been escalated" . I want this to happen when escalate button is clicked. 

For this if I make UI action as client side, i will not be able to call gs.eventqueue. 

 

Could you please help me how can I achieve this ?

 

Thanks!

Uma

Lol, you're string betting Uma! Any other requirements?!

You can run client and server side script in a ui action but you shouldn't need to just to add a comment. You can do that on the server side with

current.comments = 'your comment';

Learn SN
Tera Contributor

this is not working. I do not see any comments on the form . below is my code 

gs.eventQueue('escalate_incident', current, current.assigned_to.manager, current.assignment_group.manager);
current.comments = "Your incident is escalated";
action.setRedirectURL(current);