Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Get Lists by ListTemplateType in JSOM

$
0
0

I'm running a recursive site search to find all lists of a certain type.

It would seem to be much faster to be able to run get_lists().getByType(SP.ListTemplateType.announcements)

Is this possible, or do I need to get all lists, and then loop through each like this:

while (listEnumerator.moveNext()) {
    var oList = listEnumerator.get_current();
    if(oList.get_baseTemplate() == SP.ListTemplateType.announcements) {
    //do domething
    }
}


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>