- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 08:55 AM
Hello Experts
I'm facing an issue with an UI Policy (with Run Script enabled) which is supposed to Show/Hide fields and Form Annotations on Workspace. It works perfectly on Platform UI, but it does not work as expected on the workspace. Below is the code snippet used in the script section.
I read some posts which says some of the `g_form` API's are not supported on the Workspace, but not seen any ServiceNow KB article which confirms it.
Application: Custom/Scoped Application (Created 'glide.script.block.client.globals' property with respect to scope and set had set the value to 'false').
Version:Orlando Patch 4
Module: CSM Agent Workspace.
I would appreciate any insights on the issue and for any alternate solutions.
Thank you
Dinesh
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 09:01 AM
Not sure the $('ap').up().show() and $('ap').up().hide() is supported. Did you try checking the browser console for errors?
You can press ctrl + shift + i and click on console:
If there are any errors after running the script, that might help us further.
Also I do not see setDisplay in the supported API's:
Maybe you can change it to:
setVisible(fieldName, isVisible)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 11:15 AM
Can you try this:
SN.formAnnotations.preference = false;
SN.formAnnotations.infoPreference = false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 11:54 AM
Thank you, I checked this post earlier. But it does not helped me to crack the issue on the workspace view.
I see many of the scripts for hiding annotations works perfectly on Platform UI, but does not support the Mobile/Workspace behavior.
Dinesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 12:22 PM
I am afraid so.
What do you want to do with this question? I think it would be good to share what we have and create a separate question that focuses on hiding/showing annunciations on Agent Workspace.
Let me know what you think.
Also, can you kindly mark my answers as helpful👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 01:03 PM
Sure thing, will do. I really appreciate for your help here.!!