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

Did you name the action name of your new button as 'sysverb_update'?


ashwani_eshoppi
Kilo Expert

No, i haven't. In the ui page just made the table with the 3 buttons.


And calling onclick event on each of those buttons.


Onclick function wrote on the clientscript section of ui page, and just trying to set the value and update the record.


Isn't this code used to update the record.. gsftSubmit(gel('sysverb_update')); ?


if the update button is present on the form, it could ...


ashwani_eshoppi
Kilo Expert

Update button is present in the main form.


But the popup is not getting closed, if i use destroy method of glidedialog ,the popup goes away without updating the fields.Is there any way from client script ,   i can update the field for status in the form and redirect to same incident list view.


Try this



destroy the page (http://wiki.servicenow.com/index.php?title=GlideDialogWindow_API_Reference#destroy.28.29)


update the value using g_form.setValue


call gsftSubmit(gel('sysverb_update'));