UI page on record producer

Maria DeLaCruz
Tera Guru

Hi,

I have created the following UI page (pop-up) for my record producer upon submission, but for some reason, the pop-up window just flashes for a second.

find_real_file.png

Here's my onSubmit() catalog client script:

                  find_real_file.png

Is there anything I'm missing?   What can I add to my catalog client script so that the UI page pop-up will display for a few seconds before being re-directed to the newly created record?

Thanks,
Maria

2 REPLIES 2

brian_degroot
ServiceNow Employee
ServiceNow Employee

Hi Maria,



Likely what's happening is that the server-side code that handles the redirect is executing just after the onSubmit() action is processed. If you want a momentary pause between the pop-up being displayed and the page redirect, you can add a delay to the submit action to allow time for the UI Page presentation. To do this, you can add the following to the beginning of your record producer script:



gs.sleep('5000'); // milliseconds to wait before continuing


producer.redirect="home.do";



Thank you,



Brian


Hi Brian!



Thanks for the response!   It does work, but only some times.   Other times, instead of getting the pop-up right away, it would show a dialog window that says "Loading....." then my UI page will just show for a quick second.



Maria