- 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-28-2018 08:14 AM
This could be an alternate workaround - "Suggestion" Tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2018 08:18 AM
Your solution looks very interesting - thanks for sharing Jim!