74. spUtil Application
Did you know there are a set of methods available for portal widget’s client controllers?
OOTB there is a set of methods available under spUtil to help you speed up your scripting for the client-side.
Two simple methods I recommend are spUtil.addErrorMessage & spUtil.addInfoMessage. Allowing you to quickly bring up a message popup for the user which is non-invasive (like an alert box).
There are also more complex methods such as record watchers which can watch records on the backend and pass back the changed values. All in all they are very useful and are supported out-of-the-box functions.
More details — https://docs.servicenow.com/bundle/vancouver-api-reference/page/app-store/dev_portal/API_reference/s...
P.S. Here’s the snippet of code from the example above, don’t forget to pass spUtil into the function!
https://medium.com/@LearnITbyPrashant/74-sputil-application-366caab00c7a?source=rss-d005fc598f0a------2