Confirm box

harry24
Tera Contributor

Hello ,

 

I have an ui action on change table whenever UI action is clicked there should be confirm box and if confirm box is cancelled then on select box field on change form it should set the value as no , how to achieve this 

 

Thanks 

2 REPLIES 2

Community Alums
Not applicable

Hi @harry24 

Please find the below script that needs to be present in the UI action, for change request table  and I have taken an example of choice field,  for setting the value :

function updatechange()
{

    var answer = confirm("Confirmation Message");
    if(answer == false)
    {
        g_form.setValue("u_yes_no","No");
        
    }
}
 
Please mark it helpful, if it helps

ersureshbe
Giga Sage
Giga Sage

 

Hi,

 

There is OOB UI page exist for Ok and Cancel msg box. May you create duplicate  UI Page and call via business rule where it's required.

 

https://instancename.service-now.com/now/nav/ui/classic/params/target/sys_ui_page.do%3Fsys_id%3D2305...

 

UI Page design as per your requirement with below steps.

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

 

 

Regards,
Suresh.