logo

NJP

https://web.archive.org/web/20181121122742/https://servicenowgems.com/2017/03/

servicenowgems.com · Sep 09, 2024 · article

Update: Added a short video showing the functionality in this example

mar-6-2017-11-01-am

The above GIF shows the functionality – as you can see the UI gets blocked with a message to “Please wait” – this is customisable by following the documentation on BlockUI page. Also, in the example, it takes a few seconds to get the “Managers name” – this is hardcoded to wait so that you can see the code in action for longer.

Ajax is a great technology and extremely useful for updating a form without the need to save and reload the form.

Often we use it in ServiceNow to facilitate form entry and giving the user additional data/restricting their data etc.

For example, a user enters a server CI on the form, we then update additional fields with current RAM and HDD space. The issue is however, these fields are editable while retrieving the data, and so a user might enter the data while the Ajax call is being created (sometimes the Ajax call is super fast, other times… not so much). So the solution I’m proposing below will automatically add a pop over to block the UI while the Ajax call is being made until it’s returned. Continue reading

View original source

https://web.archive.org/web/20181121122742/https://servicenowgems.com/2017/03/