Cloning Topic Content widget in custom app scope is not accessible and getting an error on ESC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
I have a requirement to clone the Topic Content widget in a custom scope and modify the widget,
After cloning the widget and added the widget to a page, once we open the page in ESC portal widget is hidden and getting an error(Attaching the error)
This is caused by contentSearchUtils OOB script include which is accessible in ESC app scope only
does anyone have suggestions that i can access the cloned widget to work as expected in custom scope
we should not edit the OOB script or we cannot write a script include in ESC APP scope to extend the original script to all app scopes, do we have any better way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If changing accessibility is not allowed, you can create your own script include in your custom scope and replicate only the required logic from contentSearchUtils, then update your cloned widget to use your custom script include instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Cloning the script include might be at risk for future upgrades right, we have to manually maintain the custom script include in future
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Yeah, you are absolutely right, cloning the script include will create a maintenance overhead and is not upgrade safe, because any changes in the OOB contentSearchUtils will not be reflected in your custom copy.
A better approach here is to use cross scope access instead of cloning. You can set the script include to be accessible from all application scopes and use Caller Restriction. When your custom widget tries to access it, ServiceNow will create a request in the Restricted Caller Access table, which an admin can then approve.
Once approved, your custom scope will be able to use the OOB contentSearchUtils without modifying or duplicating it.
Documentation Link - Define cross-scope access to an application resource • Australia Build or modify applications • Doc…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@Ankur Bawiskar do we have any suggestions on this
