UI Page not rendering when passing parameters from UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 02:33 AM
Hi
I have a UI action (client with Onclick) on Incident, in which I am trying to pass the SysId and CI to a UI page. However, the dialog window does not render unless I remove the "dialog.addParam" lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:09 AM
you can fetch the parameter values inside UI page HTML section itself and then use those in client script
to fetch directly in client script use this
var sys_id = "${JS:sys_id}";
var cmdb_ci = "${JS:cmdb_ci}";
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
06-30-2023 03:31 AM
Still not sure if I'm doing this right - in the html I have:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:35 AM
this should work in this way
expression="RP.getWindowProperties().get('cmdb_ci')" />
you want the value in HTML section or client script section?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:43 AM
I basically just want to populate a reference field named 'incident' and do a GlideRecord to get the asset value from cmdb_ci and populate another reference field named 'asset'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:56 AM
can you share entire UI page script HTML, Client Script, processing script?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader