Monday, 2 February 2015

New properties in _spPageContextInfo variable in SharePoint Online / Office 365

Hi All,
 
Today, sharing one important finding. In our SP2013 farm solution project we were very heavily using Java Script variable _spPageContextInfo which SharePoint providing us.
 
There are various good blog post for this, one of those is  http://sympmarc.com/2013/03/26/using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script/. So I will not go into more details of it.
 
But recently I got a chance to use this variable with my SharePoint online site. Then I noticed there are few more properties which are available in SharePoint Online.
 
One of the important property userLoginName: In on premise version this property of _ spPageContextInfo is not available but available in SharePoint online. This seems to be very useful property since without extra call (and callback :) ) we directly get the user LogInName.
 
Couple of the other important properties are like isAppWeb, env etc. but I’ll explore those and may be write new post.

Thanks!

Enjoy reading J

Feel free to comment / feedback if any or if you have any query J

No comments: