I am trying to get the default view url of a list in SP hosted app. Below is the code i am trying, on execute success method.
spListobj.get_defaultViewUrl();
It is returning me this error : The property or field 'DefaultViewUrl' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
Then ss, the error suggests i include the DefaultViewUrl property while loading the List object as:
ctx.load(spListobjCollection, 'Include(Title,BaseTemplate,DefaultViewUrl,ItemCount)');
Edit: I am loading the listCollection together and using enumerator to get individual list . But still no luck.