how to trigger an event from a UI Action button

sonbol_montakha
Giga Contributor

I have a send button , by clicking the send button an email should be sent to some people. I've already set up an email notification , an event, and a business rule. But my question is that how do I trigger the event with my UI action button ( send)?

1 ACCEPTED SOLUTION

Only if you are using the parameters as recipients should you choose to check these.


View solution in original post

19 REPLIES 19

Only if you are using the parameters as recipients should you choose to check these.


Thanks Chris. I found your article very helpful.



Thanks for your help.



Regards,


Shamma


HI Christopher,


I have a developer helping me on this but we're stuck.   I've had him read this post but he's stuck and new to ServiceNow.   I'm new to scripting and this concept all together so I'm not much help to him.



Below I have pasted the Script he has on the UI Action.   It's not working.   Could you possibly see where we went wrong?



find_real_file.png



Long story short, We need a button on our core_company form , that button is supposed to trigger a notification when we click it and we're looking for the easiest way to get it done.



Any tips?


Carl, that's way over-complicated.


You should be able to do this by just having the UI Action plainly call gs.eventQueue.   Only thing I need to know is who you plan to email (besides test@test.com)



Got cycles this afternoon if you need to call.


Thanks Robert.  



We have a field on our Vendor (core_Company) form called "Vendor Emails"   It's a string with comma separated email addresses.



the actual field name is "u_vndr_email"



Here's what it looks like in the scheduled job that emails the same notification



var _emailList = gr.vendor.u_vndr_email;


  _email = _emailList.toString().split(';');