UI Action Button on Portal which shows Confirmation Popup

Aruna Sree Yela
Tera Guru

Hi,

 

How can I add a button which should be available on Portal and when user clicks on it, it should show a popup with confirmation message to click OK or CANCEL

Scenario:

1. There is a button called "Decline" when user clicks on it, it should show a pop up that contains 'Are you sure to Decline?'

If user clicks on OK, it should come out of the current page

If user clicks on CANCEL it should land on current page

Thanks in Advance

2 REPLIES 2

Shamma Negi
Kilo Sage
Kilo Sage

Why dont you try putting below script in an UI Action

 

var ans1 = confirm("Are you sure to Decline?");

if(ans1 == true)

{

g_navigation.open('incident_list.do?sysparm_query=active=true');
 

}

else

{

return true;

}

Regards,Shamma Negi