cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sheldoncopper73
Resolver I
Resolver I

Retrieve Multiple Bug

Hi,

 

I was using context.webapi.retreiveMultiple for retreiving records from CRM, but I am able to retrieve only 500 records the

nextlink attribute is coming as undefined for retrieveMultiple 


CroppedRetrieveMultipleIssue.png

5 REPLIES 5

Can you post your code. I've tried doing this and I get the nextLink fine:

 

this._context.webAPI.retrieveMultipleRecords("account", "?$select=name", 25).then(
			function success(result) {
				for (var i = 0; i < result.entities.length; i++) {
					console.log(result.entities[i]);
				}
				console.log("Next page link: " + result.nextLink);
				
			},
			function (error) {
				console.log(error.message);
				
			}
		);

Instead of odata query if we use fetchXml at that time nextlink property is coming undefined.Sorry didn't mentioned it before

Ah right - well for fetchXml queries there is no 'nextLink' - it is a paging cookie that comes back as the annotation '@microsoft.Dynamics.CRM.fetchxmlpagingcookie'

 

So I don't think that this can be classified as a bug - rather we would need to request a feature to return the pagingcookie.

 

The work around is to simply use the page and count attributes of fetchxml - rather than the paging-cookie attribute (allbeit not as efficient for large recordsets). If you absolutely needed the paging cookie you would need to hand-craft your request/response using an XMLHttpRequest

 

Hope this helps

 

 

Thanks 


@ScottDurow wrote:

Ah right - well for fetchXml queries there is no 'nextLink' - it is a paging cookie that comes back as the annotation '@microsoft.Dynamics.CRM.fetchxmlpagingcookie'

 

So I don't think that this can be classified as a bug - rather we would need to request a feature to return the pagingcookie.

 

The work around is to simply use the page and count attributes of fetchxml - rather than the paging-cookie attribute (allbeit not as efficient for large recordsets). If you absolutely needed the paging cookie you would need to hand-craft your request/response using an XMLHttpRequest

 

Hope this helps

 

 


Thanks for the analysis @ScottDurow . You are awesome. 

hemant

 

 

Thanks 🙂

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Users online (1,139)