Using a UI action to fire a Notification.

austiin
Giga Contributor

There was another article i read "how to trigger an event from a UI Action button " thats pretty similar but im a bit confused with how you set this up. what code do i need to connect the event to the business rule? What code do i need to connect the event to the notification? How do i set up the UI action to call the event? Im pretty new to this and my coding is not strong. I have an event, a business rule, a notification and a UI action. How do i link all of these together so that when I click my UI action my notification is sent?

1 ACCEPTED SOLUTION

Hi Austin,



1) Once the Event Has been setup under Registry module as shown below:


find_real_file.png


2) Navigate to your respective UI Actions and configure the event submitted above   to trigger it from the UI Action as shown below in the example below:



find_real_file.png



In the above screen shot you can specify the Event Name, post which Navigate to the Notification module and configure your Notifications accordingly as shown below:



find_real_file.png



Select your Event Name as highlighted above and other condition when you want to send this Notification and to whom you want to send in "Whom will Receive" section and Contents in "What it will Contain" section.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

6 REPLIES 6

justin_drysdale
Mega Guru

Hi,



Step 1:


First you'd have to register an event in the Registry.



Step 2:


Once you register your event, you can hook a notification to it.   Within the notification, under "Send When:" Event is fired.   Under "Event:" select the event you just registered in step 1.



Step 3:


Call your event.   From a business rule it would look like: gs.eventQueue("eventName", context, parm1, parm2);


At a bare minimum you just need the event name.



Check out:


http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification#gsc.tab=0


After that do i have to call the business rule somewhere in the UI action?


austiin
Giga Contributor

I mean the event haha my bad.


Hi Austin,



1) Once the Event Has been setup under Registry module as shown below:


find_real_file.png


2) Navigate to your respective UI Actions and configure the event submitted above   to trigger it from the UI Action as shown below in the example below:



find_real_file.png



In the above screen shot you can specify the Event Name, post which Navigate to the Notification module and configure your Notifications accordingly as shown below:



find_real_file.png



Select your Event Name as highlighted above and other condition when you want to send this Notification and to whom you want to send in "Whom will Receive" section and Contents in "What it will Contain" section.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke