- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:28 AM
Hi Everyone,
I have an UI action called “Request Document” button. When I click on UI action I would like a popup message to appear that says "Are you sure you want to send this Request Document."
In the popup window, there should be two buttons. “Proceed” and “Cancel”. Clicking on the “Proceed” button will launch process by sending the Request document. Clicking on the “Cancel” button will take back to the current page.
Please help me how to achieve this?
Thanks!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:56 AM
@Rajesh Bandila : Below is the sample code that will help you. Enable client checkbox on UI Action and provide an action name and Onclick function name.
function requestDocument() {
var answer = confirm("Are you sure you want to send this Request Document.");
if (answer == true) {
gsftSubmit(null, g_form.getFormElement(), 'action_name');
} else {
return false;
}
}
if (typeof window == 'undefined') {
// Add your existing server side logic here
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:04 PM
Hi @Rajesh Bandila ,
This cannot be done as we are using some OOTB functionality of Java script. We cannot rename it to proceed.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 05:43 AM
@Rajesh Bandila : Glad that my code worked for you and to your question on relabelling, OK cannot be relabelled.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 10:19 AM
This works perfectly fine. I want this to be implemented for Service Operations workspace. How to achieve that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 07:00 PM
Hi @Rajesh Bandila ,
Plz provide snip for ur existing code so will modify it accordingly while converting it to client n provide u.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:35 AM
Hee you go:
https://www.servicenow.com/community/developer-forum/adding-ui-action-info-message/m-p/1895176
another hint
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************