We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

getView is undefined Portal error

manibaig
Mega Guru

I am getting this error on portal only it's working fine in SN , any idea why? Thanks for your help!

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

SanjivMeher
Mega Patron

You may try g_form.getViewName()


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

Prateek kumar
Giga Sage

Try this:

var currentView = document.getElementById('sysparm_view').value;


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Brad Tilton
ServiceNow Employee

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:

https://docs.servicenow.com/bundle/london-servicenow-platform/page/build/service-portal/reference/cl...

SanjivMeher
Mega Patron

You may try g_form.getViewName()


Please mark this response as correct or helpful if it assisted you with your question.

Hi, g_form.getViewName() is returns empty value on SP! So is there any other way that we can get the view?