Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to configure sweet alert in Servicenow

Saroj Patel
Tera Expert
I need to use sweet alert in catalog client sprit . could any one share the whole process .
5 REPLIES 5

Saroj Patel
Tera Expert

function onLoad() {
swal({
title: 'Please read the terms!',
text: 'You can request this catalog item only on weekends . Would you like to continue ? ',
type: 'info',
showCancelButton: true,
confirmButtonText: 'Yes, I understand the terms!'
}).then(function(result) {
alert(result);
if (!result.value)
top.location.href = '/vd';
});
}

 

 

Promises is not working in ServiceNow as it supports ES5 so how do i handle this ? sweet alert is populating in my portal but it is not waiting for user confirmation

 

SarojPatel_0-1669547163913.png