The CreatorCon Call for Content is officially open! Get started here.

Hi , I was wondering if there is a way to force a UI action process to run in the backgrounf?

mok
Kilo Contributor

Hi ,

I am trying to force a process to run in the background after clicking a UI action/button on a form, currently the process locks out the screen and this takes time before moving onto the next item

is there a way to do this!?

1 ACCEPTED SOLUTION

Yup it would definitely stop the screen from locking out. Instead you would have a very lightweight AJAX call running in the background checking status while the actual work is done on a worker node, so it will also not take up any user semaphores.



Please do let me know if you get this working!



-Jon


Sent from my iPhone


View solution in original post

13 REPLIES 13

Chuck Tomasi
Tera Patron

Hi Mohamed,



The first thing that comes to mind is for you to write a script action and trigger it from the UI action via an event.



Script Actions - ServiceNow Wiki


mok
Kilo Contributor

Thanks ...ill give it a shot


LaurentChicoine
Tera Guru

To do this, you need a client UI action (simply check the "Client" box and use client side script). Depending on what you are trying to do you could use it to do form manipulation or asynchronous GlideAjax for server side actions.



Edit: I think Chuck answers to your question better thant me as I'm not sure of the impact of leaving the form before receiving the async GlideAjax callback.


Thanks Laurent!