Skip to content

SweetAlerts2 & ServiceNow

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.

Description from their own site: “A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript’s popup boxes. Zero dependencies.“.

Attached you’ll find an example of using SweetAlert2 in the ServiceNow platform. More information about SweetAlert2 can be found here:

The example is based on quickly adding a incident from the list view. A short video demoing the feature can be seen here.

To be able to use SweetAlert2 in the platform there’s an update set on share:!/share/contents/1722265_sweetalert2_a_beautiful_responsive_customizable_accessible_waiaria_replacement_for_javascripts_popup_boxes?t=PRODUCT_DETAILS

There’s also a portal version which can be found here:!/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
Published inServiceNow

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2020 Tech[Net] | Crafted with ♥ by Morten & rollin' on Author