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!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,543)