- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 02:16 AM - edited 10-26-2023 02:20 AM
Hey guys, I need help with figuring this out so I have a UI action which code opens a UI Page in a Modal window.
function modalPopUp() {
var gm = new GlideModal("x_adab_quality_populate_via_template", false, 600);
gm.setTitle("Choose a Template");
gm.render();
}
It's pretty basic, now down bellow I did enable for this button to show in the Workspace when a Workspace Client Script presented itself, how can I use my UI page in anyway when this UI Action button is clicked from the Workspace?
Probably it's not an easy straightforward approach, please help 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 06:20 AM
you need a workspace client script written in UI action
Did you write it?
there is a syntax to open UI page
this is the syntax
var ui_page_id = '<sys_id_of_your_ui_page>';
g_modal.showFrame({
url: '/ui_page.do?sys_id=' + ui_page_id,
title: 'Choose a template',
size: 'xl',
height: 500
});
reference: UI page on Agent workspace
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
10-26-2023 06:20 AM
you need a workspace client script written in UI action
Did you write it?
there is a syntax to open UI page
this is the syntax
var ui_page_id = '<sys_id_of_your_ui_page>';
g_modal.showFrame({
url: '/ui_page.do?sys_id=' + ui_page_id,
title: 'Choose a template',
size: 'xl',
height: 500
});
reference: UI page on Agent workspace
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
10-26-2023 11:58 PM
Hey this totally works, is there any way to "beautify" what's shown since the pop looks really ugly 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:15 AM
You might have to check on community and blogs.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:16 AM
One last question, why do I get this error for example :
mousePositionSave is not defined ?
My ui page contains couple of buttons and a reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:26 AM
Hello @Stefan Petkovic
It can happen because you might have ticket client callable checkbox in UI action and onClick field
of UI action is empty.
You need to mention the name of function into that field.
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh