How to get the current view in client-side script

bonsai
Mega Sage

We use "RP.getViewName()" to get a view in a server-side script, but how do we get the view name in a client-side script?

2 ACCEPTED SOLUTIONS

Harish KM
Kilo Patron
Kilo Patron

Hi @bonsai you can use the below script to check view name in client script

 var view = getView();
 alert("test"+view);
if(view == 'ess')
{
alert("inside");
}
Regards
Harish

View solution in original post

Unique45
Mega Sage

Hello @bonsai ,

Using getView() method you can get view name in the client side.

 

 

Please mark correct/helpful if this helps you!

View solution in original post

8 REPLIES 8

Harish KM
Kilo Patron
Kilo Patron

Hi @bonsai you can use the below script to check view name in client script

 var view = getView();
 alert("test"+view);
if(view == 'ess')
{
alert("inside");
}
Regards
Harish

Where did you learn about "getView()"?
It doesn't seem to be listed in the references either. .

oh!
I thought it could only be used with "g_list"!