Alternative to the GlideModal setPreference() method in Workspaces ... ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 01:51 AM
Hello all,
Bit of an issue here - I'm trying to modify a copied version of the OOTB Incident UI Action "Propose Major Incident".
The ask is for one of the string field which pop up in the GlideModal, "Business Impact", to prepopulate with a series of text prompts for the end user. In Core UI this is fine; just edit the g_form.setPreference() to include the new string, fine.
In Workspaces I'm having more trouble however ... As far as I'm aware you can't use GlideModal in Workspaces, and instead I'm having to use g_modal ... The problem being that in the documentation, in g_modal.openFrame() I can't see anything resembling the setPreference() method ... Does anyone have any ideas as to how I could resolve this?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 04:09 AM
Isn't the same UI page getting rendered in native and workspace both?
If yes then the logic should work fine at both places
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
08-01-2025 07:07 AM
The UI page is yes, are you able to use GlideModal.setPreference() within the UI Page itself? If so I could just do it there (still a little bit sure about where to do it though ...), Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 09:03 AM
you want to pass the static text from workspace client script to UI page?
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
08-01-2025 02:54 AM
Give u example for it:
UI page code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 02:11 AM
are you calling some UI page from g_modal.showFrame()?
If yes then you can include the parameter and then grab it in the UI page.
you should have multiple OOTB UI actions doing this.
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