How to get Updated list properties using PnP JS in SharePoint online.

%3CLINGO-SUB%20id%3D%22lingo-sub-1078355%22%20slang%3D%22en-US%22%3EHow%20to%20get%20Updated%20list%20properties%20using%20PnP%20JS%20in%20SharePoint%20online.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078355%22%20slang%3D%22en-US%22%3E%3CP%3Ewhen%20I%20try%20to%20get%20the%20latest%20list%20properties%20I%20am%20not%20getting%20latest%20properties%20like%20change%20token%2C%20ItemsCount%2C%20LastItemDeletedDate.%20When%20I%20use%20open%20developer%20tools%20getting%20the%20actual%20result.%20Here%20is%20my%20code%3C%2FP%3E%3CP%3E%24pnp.sp.web.lists.getByTitle('listname').get().then(function(items)%20%7B%3CBR%20%2F%3Econsole.log(items.ItemCount)%3B%3CBR%20%2F%3E%7D)%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

when I try to get the latest list properties I am not getting latest properties like change token, ItemsCount, LastItemDeletedDate. When I use open developer tools getting the actual result. Here is my code

$pnp.sp.web.lists.getByTitle('listname').get().then(function(items) {
console.log(items.ItemCount);
});

1 Reply

@HemachandraP 

I am having the same problem - getting wrong result when trying to get number of items in the list.

Any resolutions to this?

 

Regards

Leif