How to pass sysid of the workspace page to ui page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 03:31 AM
Hi @Ankur Bawiskar @Community Alums @AndersBGS @Allen Andreas @Prince Arora @AnveshKumar M
I need to pass the sysid of the workspace page to the ui page normally we use set preference in glidedialogwindow but in workspace ui actions we use g_modal. can anyone please help me out how to pass sys_id of the workspace page to ui page through workspace ui action script.
Thanks in Advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 04:00 AM
Hello Uaday,
You can pass record sys_id in workspace client script by using below line.
var recSysId = g_form.getUniqueValue();
Mark as correct and helpful if it solved your query.
Regards,
Vaibhav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 04:02 AM
@Vaibhav Ok but how to retrive that in ui page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 04:39 AM
you can write this line in UI Page Client script section and utilise this variable.
For your reference you can refer below OOTB code written in UI Page Client Script section:
copyAsmt: function() {
this._closeDialog();
var changeRequestSysId = g_form.getUniqueValue();
var tableName = g_form.getTableName();
var ga = new GlideAjax("ChangeRiskAsmtAjax");
ga.addParam("sysparm_name", "copyAssessmentAjax");
ga.addParam("sysparm_id", changeRequestSysId);
ga.addParam("sysparm_class", tableName);
ga.getXMLAnswer(this.processAsmt.bind(this));
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 05:13 AM
tried not working @Vaibhav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 10:27 PM - edited 05-26-2025 11:11 AM
I'm having similar usecase, I have a ui action where i'm passing few parameters from client scirpt using setpreference and opening an ui page using glide dialog window and accessing them on ui page using render properties. This works as expected on native view but not workspace. I'm not able to figure out a way to pass parameters to ui page when it is opened from workspace client script. I have tried solutions suggested on communities but no luck.
@Uday_Kumar , did you manage to work this out?