- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 06:09 PM
I am getting this error on portal only it's working fine in SN , any idea why? Thanks for your help!
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 07:36 PM
You may try g_form.getViewName()
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 06:36 PM
Try this:
var currentView = document.getElementById('sysparm_view').value;
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 06:54 PM
There are many client side apis and methods available in the main ServiceNow interface that are not supported in Service Portal. Here is a full list of supported client side APIs:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2018 07:36 PM
You may try g_form.getViewName()
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2021 03:18 AM
Hi, g_form.getViewName() is returns empty value on SP! So is there any other way that we can get the view?