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 02:52 AM
you are not passing the field value and hence it's failing there since you just added variable there but didn't declare it
update as this
function updateAsset(){
var sys_id = g_form.getUniqueValue();
var cmdb_ci = g_form.getValue('cmdb_ci');
var dialog = new GlideDialogWindow('update_asset');
dialog.setTitle("Update Asset");
dialog.setHeight(800);
dialog.setWidth(600);
dialog.addParam('sys_id', sys_id);
dialog.addParam('ci', cmdb_ci);
dialog.render();
}
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 02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:00 AM
I believe I answered your original question i.e. UI page was not rendering.
Next you need to debug the UI page
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:06 AM - edited 06-30-2023 03:07 AM
@Ankur Bawiskar :Rendering' was obviously not the correct term
can you please advise the correct syntax to retrieve these values in the UI page?
I have the following lines in the client script: