UI Action Button on Portal which shows Confirmation Popup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 04:44 AM - edited 12-15-2023 04:46 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 04:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 05:03 AM
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;
}