Call Script Include from UI Action to trigger event

Kedar Pittman
Giga Guru

Hello, I am trying to send a notification from a UI Action. Previously I had this working as a server side ui action using gs.eventQueue. Our needs have changed and before this notification is sent we need a pop up confirmation box. 

I have changed the UI Action to now run client side using an onClick() function using "confirm" to trigger a pop up .  If the user response is 'true' I am using GlideAjax to call the script include which should fire the event using gs.eventQueue. 

It seems the event is not being triggered using this method. I have researched the docs/wiki and from what I am able to see this should work. Any help would be greatly appreciated, I have include my code below. 

UI Action

find_real_file.png

 

Script Include

find_real_file.png

1 ACCEPTED SOLUTION

siva_
Giga Guru

This seems that you need to make your UI action work on the client side and also the server side 

Please refer to the link below 

https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/

 

That should help 

Mark this response as correct or helpful if that really helps 

 

Thanks,

Siva

View solution in original post

2 REPLIES 2

siva_
Giga Guru

This seems that you need to make your UI action work on the client side and also the server side 

Please refer to the link below 

https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/

 

That should help 

Mark this response as correct or helpful if that really helps 

 

Thanks,

Siva

Thank you Siva, I have confirmed this has worked and now this has opened up more possibilities for our ui actions.