How to create an alert box with "YES" or "NO" Button in incident Form

Pragati4
Tera Contributor

How to create an alert box with "YES" or "NO" Button in incident Form

Need to create an alert box in incident form for some condition(ex: if caller company is XYZ then while submitting the form alert window should come )!!

1 ACCEPTED SOLUTION

HarshTimes
Tera Guru

Hi Pragati

YOu need a confirm box not alert. Create a on submit client script with your company condition and add the below script 

confirm("company is xyz...");

This will give you ok and cancel button. You can code it according to your requirement.

 

-Harsh

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Pragati,

What is your exact requirement?

Can you explain the scenario?

Why not create a GlideDialogWindow onSubmit if company is xyz and in that UI page have 2 buttons

Regards

Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

While submitting the incident if caller company is "xyz" pop up window should come with "yes" or "no" button.

If someone select "yes" form will get submitted

If someone select "No" then again it will redirect to same page without submission.

Hi Pragati,

You can go ahead with confirm box. You will only have OK and Cancel as options. values yes or no is not possible.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

HarshTimes
Tera Guru

Hi Pragati

YOu need a confirm box not alert. Create a on submit client script with your company condition and add the below script 

confirm("company is xyz...");

This will give you ok and cancel button. You can code it according to your requirement.

 

-Harsh