use of the canView() function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 08:51 AM
I am unable to find any documentation on the canView() function in ServiceNow...
i know that in a background script for example i can use rec.canView() to evaluate if the person at the keyboard can view a catalog item.... but does it work for other record classes.. and can i pass any information into the canView() function... for example the ability to pass in a user sid would be GREAT to be able to evaluate if someone else can view things.. this way we can write scripts in the background script module.. test them completely and THEN move them to where they belong.
has anyone seen ANY documentation of the canView() function? i checked all of the scripts on my system and the only time i find it it doesn't pass in any parameters.
- 3,817 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2018 02:57 AM
Hi
I have the same issue, and try to figure out.
The Documentation for "canView" (for the Catalog / not the Items) can be found in the Docs at:
https://docs.servicenow.com/bundle/london-application-development/page/app-store/dev_portal/API_reference/CatalogJS/concept/CatalogJSScopedAPI.html
I start working on the "CatItem - Scoped" API, which has a "canViewOnSearch()" function.
Let me know, if you get somewhat futher, or if this answers your question.
Thanks
Dirk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 08:43 AM