How to create an event in run script?

SNnewbie2
Tera Expert

How do I create an event using an script in run script? I want to be able to create an event to create a notification for each person I want to send it to.

35 REPLIES 35

I am able to preview my notification.


What's on the other tabs (who to send, what to send)...?



So far, you've done what you set out to do (create an event).


Yes I was able to create the event. But I need to sent that event to the owner group, solutions manager, etc.


If I have to send it to the requestor for it would be easy because I can just selected from the list above


find_real_file.png


But in my case I have a reference field in my form in which the user will select the CI. base in that CI that the user selects I need to find the owner, and send that email notification to the member.


Claudia Cruz wrote:



But in my case I have a reference field in my form in which the user will select the CI. base in that CI that the user selects I need to find the owner, and send that email notification to the member.


If the field is on the form, you should be able to dot-walk to this user.


PriyaRanji
Tera Guru

Hi Claudia Cruz,



Good Day



Please find the below points for your reference :



1. Create an Event Registry - eg: arp_order_circuit



2. Create the Script Action with the event name "arp_order_circuit"



Script Action.png


You can write the logic in the script based on your needs.



Script.png




3. You can use the below code in your run script to call the script action, where the events gets fired and the script written will works.



  gs.eventQueue("arp_order_circuit", current , current.sys_id , current.sys_id);



Hope it will helps you out!



PS: Your feedback (Like, Helpful or Correct) helps community



Thanks,



Priyanka R