Not able to search a document library on sharepoint with more than 500 records

0

I am using sharepoint 2016 online. My document library has more than 500 documents. I am trying to fetch records with the below caml query :

<View><Query><Where><And><Eq><FieldRef Name='ContextId'/><Value Type='Integer'>xxxxxxxx</Value></Eq><Eq><FieldRef Name='NumericRecordId'/><Value Type='Integer'>xxxxx</Value></Eq></And></Where></Query</View>

     var list = context.Web.Lists.GetByTitle(listName);
            var collection = list.GetItems(query);
            context.Load(collection);
            context.Load(collection, f => f.Include(i => i.File));
            context.ExecuteQueryWithIncrementalRetry();

            return
                from c in collection
                select GetFileResultFromSharePointFile<T>(context, c.File, documentTypes);

If i try to delete one record from sharepoint online (count goes to 499) then this results in desried record on the basis of caml query but doesnt work with 500 or more than 500 records and i get Exception from HRESULT: 0x80131904 exception

Can anyone please assist me on this?

sharepoint
sharepoint-online
asked on Stack Overflow Apr 2, 2020 by user2903316

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0