Catalog Client Scripts - Unable to use restricted scripting for DOM manipulation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 06:12 AM
For some background information on what I am trying to achieve, I have a catalog item page in the employee center that I would like to target the DOM to use restricted scripting (cannot achieve through g_form methods). In doing so, I am using the Catalog Client Script service to target the specific UI page.
Using the suggested solutions of disabling 'glide.script.block.client.globals' in the system properties (scoped app) and disabling isolate script, I was still unable to get Catalog Client Scripts to use restricted scripting. (Javascript/jQuery calls: document, windows, $, etc. )
The odd occurrence is that the suggested solutions take effect on Client Scripts but not Catalog Client Scripts. Client Scripts may be out of the equation, as I could not target the catalog item on the employee center via Client Scripts tables.
Any suggestions or thoughts would be much appreciated. Thanks!
Catalog Client Scripts:
System Property Config & Errors received:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 08:22 AM
Hi @DoraTheExplorer ,
You cannot use document method inside Catalog Client script per this article: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0719250
If you want to disable that submit button, do it inside its Widget .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 10:34 AM
Hi @Community Alums,
This solution looks promising. Will look into this, thank you~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 09:51 AM
Hi,
Why do you want to disable the "submit" button on a catalog item?
In case, if that catalog item is just for information purpose create a Content Item instead of Catalog item.
Check this link on how to create a Content Item -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 10:39 AM - edited 02-14-2024 10:41 AM
Hi @Anirudh Pathak,
I want to disable the submit button when a guided tour is in session (so no accidental ticket is submitted), but keep the submit button enabled for live submissions. Overall, it would be nice to know if I can manipulate the DOM for future use in the Service Portal.