The CreatorCon Call for Content is officially open! Get started here.

Popup confirmation with multiple buttons

ashwani_eshoppi
Kilo Expert

I want to build an Alert once any incident gets resolved.

The popup needs to have confirmation buttons -   'Yes' , 'No' and 'Cancel' .

On click of 'Yes' or 'No' need to do actions on server side.

If i simply put an alert it shows only Ok and Cancel.

Has anyone implemented such confirmation box before?

28 REPLIES 28

Vladimir Kobeti
Giga Guru

Hi,



please start on the wiki here: Displaying a Custom Dialog - ServiceNow Wiki



Some nice examples might be found here:


http://www.servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/


or here:


http://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/



I would say that this topic is a little advanced ...



Hope this helps!


Vladimir


Kalaiarasan Pus
Giga Sage

Create a UI page and add the options and the look and feel you need. There is nothing out of the box for this...


ashwani_eshoppi
Kilo Expert

Thanks Vladmir.Will check the links you provided.


ashwani_eshoppi
Kilo Expert

Hi Kalaiasaran/Vladmir,



I have built the popup by using glidedialog window calling the ui page.


Associated an onclick event to the buttons of the form.



Now suppose if the user clicks button 'No' from the popup, then i need to update the value in the form with the selected value Resolved i.e. state=6.



Client script on the ui page :


function clickedNo()


{    


  g_form.setValue('state',6);


  gsftSubmit(gel('sysverb_update'));


}



But after clicking the button, the form does not reload or update the value instead i see the same popup again.


Strangely if i set the value to '7' in the same client script under this ui page , the form reloads and updates this value.



Any idea, why this is happening, and how can i achieve the same by setting the state to 6.