- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2019 02:10 AM
Hi I am trying to put a confirmation popup upon clicking of a UI action on my UI actions for request form Widget in service portal. Can anyone suggest me how can i achieve that.
There is simple list on Service portal which is displaying my requests. Once we open a request form we can see few action in right side of the form. For those actions i have created a widget called UI actions and in those UI actions there is one "cancel" button. Now what my customer wants is i need to put a confirmation message before cancelling the request. It will we great if someone can suggest me how to achieve it.
Mohit Kaushik
ServiceNow MVP (2023-2025)
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2019 02:51 AM
Hi thanks for your response, but I have used spModal to achieve this. The spModal class provides an alternative way to show alerts, prompts, and confirmation dialogs and can be used in Client scripts of Service portal. I got it from the below mentioned link.
https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_re...
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2019 11:47 PM
So in your widget, on the cancel button add this (if you are not calling a function there) - < ng-click = "userCancelConfirm()">
If you are calling a function on ng-click in the cancel button (or if you use the userCancelConfirm() function)
// userCancelConfirm function definition
in Client Script of the widget -
$scope.userCancelConfirm= function(){
var userConfirm = confirm("Do you want to cancel this");
if(userConfirm){ //userConfirm is true now
//Do something on
alert("I am cancelled with confirmation");
}
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2019 02:51 AM
Hi thanks for your response, but I have used spModal to achieve this. The spModal class provides an alternative way to show alerts, prompts, and confirmation dialogs and can be used in Client scripts of Service portal. I got it from the below mentioned link.
https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_re...
Mohit Kaushik
ServiceNow MVP (2023-2025)