What if we could use the beautiful SweetAlerts popup’s together with ServiceNow – wouldn’t that be awesome? This is something I used as a hobby project about a year ago to get better knowledge on SweetAlerts but also on some specific (missing?) ServiceNow features.
Attached you’ll find an example of using SweetAlert2 in the ServiceNow platform. More information about SweetAlert2 can be found here: https://sweetalert2.github.io.
The example is based on quickly adding a incident from the list view. A short video demoing the feature can be seen here.
There’s also a portal version which can be found here: https://developer.servicenow.com/app.do#!/share/contents/1320723_sweetalert_2?t=PRODUCT_DETAILS
The script include and ui action of what’s shown in the video can be found below as a zipped xml file.
ATM there’s only functions (GlideAjax) in the script include to:
- Add an incident
- Get callers dynamically from sys_user and show them in a drop down
- Get choices from a given field