- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 05:35 AM
I'm facing an issue where I need to pass data from a UI Page Client Script to a Workspace Client Script callback function, i referred community articles but this wasn't helpful.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 07:37 AM
did you explore few of the OOTB UI actions?
somewhere the logic must be present.
you can use callback method, I believe ServiceNow uses iframeMsgHelper for this
Search with UI page client script contains -> iframeMsgHelper
UI page client script using that and including the data to be passed
Then in workspace client script, it's accessed like this
OOTB UI page: time_sheet_recall_dialogue
OOTB UI action: Recall (time_card) table
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-06-2025 05:41 AM
In my case, the functionality works correctly in Native UI, but in Workspace, I'm unable to retrieve the values as expected.
My requirement is: when a modal opens, it displays some fields. Based on the data entered in those fields, a GlideAjax call is triggered to create a record and return the sys_id and i set it to one field using g_form.setValue().
While the sys_id is successfully returned in Workspace, I'm unable to retrieve or use it properly within the Workspace client script. I’ve tried using iFrameHelper and postMessage, but those approaches didn’t work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2025 07:00 AM
did you check the OOTB UI page and UI action?
there ServiceNow is passing the data using iframeMessageHelper
May be some part is getting missed and hence it's not working.
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