How to call GlideDialogWindow from client script of another ui page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 03:12 AM
Hi,
I have created one button UI action on form. When we click on button then dialog box opens up which has Cancel and Submit button. Till here everything is working fine. Now when we click on Submit button, another dialog box should open which also need users confirmation asking "do you want to Add or replace" which has 2 buttons "Add" or "Replace". Is there any way to achieve it?
Thanks
Pooja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 06:34 AM
Hi Ankur,
Requirement is:
I have UI action on form named "Copy Record". When user click on this button first dialog box should be shown which has project reference field and "Submit" and "Cancel" button. When we select the project
record in that field I have to check if particular type of record is already present to the selected project record. If the record is present then I want to show second dialog
box on same page saying, "The record of this type "xyz" is already present do you want to replace it or add it" which has 2 buttons "Add" and "Replace".
If user click on Add then new record should be created and if he selects Replace then old one should deleted and new should create and attached to that selected project record.
Please let me know if this is possible or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 07:39 AM
Why not use single UI page and show a drop down with 2 options Add/Replace
Let user select the Project and the option and then based on that handle the logic
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 02:58 AM
Hi Ankur,
As soon as user select the project in reference field of ui page then I want to show the message on the same confirmation window that "The record of this type "xyz" is already present to the project do you want to replace it". And one check box will be shown on same dialog window based on if record is already present (should be present in related list of project) for selected project. so user can give input via that checkbox. And then user can click submit or cancel.
I am struggling how to check the record of selected project in HTML of ui page. Could you please help me with the code:
Here is my HTML code: