How to create UI page with two buttons yes or no when click Approve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 12:13 AM
Hi Everyone,
I have a requirement when approver click Approve need to display dialog box with two buttons Yes and No
with display the content
"Have all tickets transferred appropriate group"
If click on Yes request should approve
If click on No state should not change
I create UI page with below code for create two buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 12:25 AM
You said you want this UI page to open on click of Approve then why client script?
Are you referring to OOB Approve UI action on sysapproval_approver table?
if yes then why to customize that?
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-13-2025 12:49 AM
client script required to change the state to approved when click on YES
and i need this dialog box for specific catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 01:11 AM
you can use onChange client script and display business rule
Display business rule - will tell you the approval is for which catalog item and store that in scratchpad
OnChange - use that scratchpad and check the state is Approve then use GlideDialogWindow to show the UI page
refer below links for help
Display Business Rule and g_scratchpad
GlideDialogWindow: Advanced Popups Using UI Pages
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
05-07-2025 12:27 AM
Did my reply answer your question?
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