script is not working for Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 12:39 AM
Team , good day !
We have written script to hide dms details related links. that is working fine for Native view , but its not working for agent workspace ....
g_form.setSectionDisplay('dms_details',true);
g_form.setSectionDisplay('dms_details',false);
Please have a look and let me know what can be done here .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 01:58 AM
please share your complete script and script screenshots
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-08-2023 02:23 AM
Hi @pramn
the given API methods only apply to the classic UI, but not to any workspaces. These workspaces are different experiences with different technologies and different APIs.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 09:30 PM - edited 08-08-2023 09:31 PM
so what would be the correct API ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 11:21 PM
Hi @pramn I believe g_form.setSectionDisplay(); will be used to Show/Hide form sections and it will work on both Native UI and Workspace if you correctly configure. Please have a look at my attachment it works for me on both UI.
Note: Related Links are basically UI Actions
Please Don't forgot to mark Helpful/Correct, if applicable,
Regards
Siddharam