- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:33 AM
I know, I know, DOM manipulation is not recommended.
What I'm trying to do is hide the Suggestion button next to Short Description (the table is extended from task) and it does not look like there is a property to do it.
I figure I'll just do an onLoad Client Script and be done with it, making sure to test it out during the upgrades in case the id changes.
No matter what I do everything fails. window and document are both returning null, so I cannot use the typical command (e.g. document.getElementById()). jQuery ($j) commands are not working either. My scripts run on a different task table (within the global scope) work perfectly fine every time.I even tried in a UI Policy and get the same issues.
Does anyone know of a workaround for doing DOM manipulation within a scoped app? It's driving me crazy I cannot do it within the scoped app.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:53 AM
After talking to a co-worker he spent some time searching and we found the solution. Scoped client scripts do not have access to many of the same APIs, but it's just a simple system property (on a per application basis) to enable it:
https://community.servicenow.com/community?id=community_blog&sys_id=788c66e1dbd0dbc01dcaf3231f961969
Once enabling the system property everything works great!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:38 AM
I don't... but... can't it be done using a Dictionary Override to force a particular attribute for that field, if it's an inherited one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:49 AM
Yeah - I did the dictionary attribute to get rid of the knowledge search icon but I cannot find an attribute for the suggestion icon.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:38 AM
To setup a suggestion field you set the Choice value to "suggestion". This is set on the task.short_description field that affects all tables that extend task. You can remove it for all those tables but there isn't a dictionary override for the "choice" value.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2018 11:53 AM
After talking to a co-worker he spent some time searching and we found the solution. Scoped client scripts do not have access to many of the same APIs, but it's just a simple system property (on a per application basis) to enable it:
https://community.servicenow.com/community?id=community_blog&sys_id=788c66e1dbd0dbc01dcaf3231f961969
Once enabling the system property everything works great!