Sending notification from UI action.

Community Alums
Not applicable

Hi, 

How can I achieve below requirement? 

1. Create a UI Action on the Problem form with a button at the top labeled "Message to Affected Users".
2. When clicked, a modal window opens for the sender to enter the body of the message. When finished typing, then sender clicks Done.
3. The script behind the button parses all the incidents related to the problem and builds a list of users in the Caller field and watch list for each incident. This becomes the recipients list.
4. The script then sends a notification with a subject similar to "New message regarding <Problem #> - <Short Description> and body text as entered by the sender.

7 REPLIES 7

Hi Ganesh,

while calling the UI page you can send the problem record sys_id to UI page

in the UI page html you can access the value and then store the sys_id in the hidden html element and access it directly

Can you share the UI Action script and the UI page script here?

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Tanaji Patil
Tera Guru

Why are you creating your own solution when ServiceNow is providing it to you?

Check our Email Client, Email Client Templates and Quick Messages.

Just ot let you know can write script in To field (under Receipients) on Email Client Templates stating the value with javascript:

 

-Tanaji

Please mark response correct/helpful if applicable

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

What you are trying to solve here is out of the box and custom scripting isn't required.  There is a Communicate Workaround feature that allows you to take the work around value populated in the problem and it will update all the linked incidents as a comment.  Then out of the box notifications based on incident comment updates will then send to the caller and watch list.

https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/problem-management/tas...

 

Please note this related link UI Action only appears IF the workaround field is populated and record saved.

 

Please mark this post or any as helpful or the correct answer to your question if applicable so others viewing may benefit.