Delay Redirect from a Record Producer

Not applicable

I'm looking for a way to set a timer or delay before my record producer redirects to the record it just created. When a user is redirected to a record right away, often they'll see an incomplete record and/or records in the wrong state because the workflow (several of which take a few seconds) hasn't completed. To see the updated record, they're forced to reload the form, which isn't very user friendly.

Has anyone run into a similar issue? Any suggestions on how to implement a "delay" or even a forced reload of the record?

6 REPLIES 6

Mark Stanger
Giga Sage

I'm not sure if it will work or not but you could try the following right before your 'action.setRedirectURL' statement in your UI action...



gs.sleep(1000); // sleep for 1000 milliseconds


Not applicable

gs.sleep definitely delayed the redirect, but unfortunately seemed to also delay inserting the record / kicking off the workflow. The search continues... Thanks for the suggestion!


Another shot in the dark, but maybe you can put the sleep after the redirect command.


Brad Tilton
ServiceNow Employee
ServiceNow Employee

You could redirect to a UI Page that shows some sort of loading icon and then directs back to the record after a few seconds. I think you'd have to pass the sys_id of the record you created to the UI Page as a parameter so you can redirect from the UI Page back to the record.