g_form not supported in workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 06:43 PM
HI All,
On Incident Table, we have a field called contract.
I have created a UI Action on an incident table, on click of the UI action, it opens the UI Page, On UI page we have a grid table, which display the list contract and radio button for row selection.
The UI Page is getting opened and its show the data as well [Grid Table], but when i select any row, it not setting the value to the Contract field on the Incident table. This is not working only in when the UI Page gets opened from the workspace.
I am getting the error g_form is defined ,I believe this is not supported when UI Page gets opened inside the Iframe.
I have used g_form to open the UI Page in workspace.Please suggest how to overide from the problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 11:16 PM
Hello @Ketan Pandey
2. Go to UI Action resolve on table incident
3. Put a condition like below in line number 2 in script section
if(g_form.modified){
alert(g_form.modified + " Platform ");
4. Put the same condition in Workspace client script
5. Now go to any open incident record and change anyhting on the form (like short description)
6. click on the ui action resolve.
7. Notice that the alert comes up
8. Do the same step in agent workspace and notice that there is no alert coming up.
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 11:48 PM
why not use the OOB syntax to open UI pages in workspaces?
you can check any OOB UI action for this
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2023 12:31 AM
Could you please share once examples of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 12:55 AM
I have been facing the same problem, It fixed when i change the Run scripts in UI type to all instead of desktop.