Hide Form Annotation in Workspace solution
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago - last edited 6 hours ago
As I was struggling to find an article/solved question to achieve this requirement recently, I want to share my trick to get it done.
Unfortunately, DOM manipulation is not supported in Workspace. As a result, even if you create an HTML annotation wrapped in a
<span> element with a custom ID, none of the common DOM access methods, including document.getElementById(), gel(), or $(), will work.Here are my steps to achieve it:
- Copy the sys_id of annotation in table sys_ui_annotation_type.
- Compute this string: annotation.<the sys_id>
- Use it as a element with g_form.setDisplay as below
g_form.setDisplay("annotation.<the sys_id>", false);
It will not work in server-side form so that please mark it to use in Workspace only via:
Run scripts in UI type = Mobile / Service PortalHope this helps.
0 REPLIES 0