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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Users online (71,126)