I have a array of list names and I need to fetch ListItemEntityTypeFullName
for each of the list. I can fetch the list objects. I need to know if there's any way where I can fetch only the ListItemEntityTypeFullName
property for list. Is it possible? Will there be a performance improvement if all properties are fetched and if only a subset of them are fetched?
Below is my code.
var clientContext = new SP.ClientContext.get_current();
var web = clientContext.get_web();
var allLists = web.get_lists();
listnames = ["List 1", "List 2"]; // Array of list titles
var listArray = [];
for (var i = 0; i < listnames.length; i++) {
var oList = allLists.getByTitle(listnames[i]);
listArray.push(allLists.getByTitle(listnames[i]));
clientContext.load(listArray[i]);
// Throws error
//clientContext.load(listArray[i], "Include('ListItemEntityTypeFullName')");
}
clientContext.executeQueryAsync(function (sender, args) {
debugger;
// Fetch the ListItemEntityTypeFullName by below command
listArray[0].get_listItemEntityTypeFullName();
}, function (sender, args) {debugger});