- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 06:03 AM
Hello, I have a requirement to create popup confirm window with a hyperlink that will be triggered from a UI Action. I've accomplished creating the UI Page. Now where I'm having a problem, is there additional code in the UI Action that needs to run based on the user confirming the first popup window.
Currently, when the button is clicked, the DialogWindow opens, and the rest of the code runs automatically at the same time. (Which subsequently will open a second dialog window over the first.)
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 06:16 AM
Here's a previous post on a very similar topic. It uses GlideModal() and renderWithContent() to achieve a very similar goal (with a bonus of having all of the HTML for the GlideModal dialog in the script itself, without having to create a separate page).
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 06:11 AM
Hi,
you can call the function defined in UI action from UI page client script like this
myFunction();
Now in the UI Action add this
function myFunction(){
// your lines from 15 onwards which are client side including gsftSubmit if any
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 05:24 AM
Hi @Ankur Bawiskar ,
Could you please help me on how to get return value from UI Page. it is highly important for me.
kindly provide your input : https://www.servicenow.com/community/developer-forum/how-to-use-ui-page-in-onsubmit-client-script/td...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 06:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 06:16 AM
Here's a previous post on a very similar topic. It uses GlideModal() and renderWithContent() to achieve a very similar goal (with a bonus of having all of the HTML for the GlideModal dialog in the script itself, without having to create a separate page).
Frank