Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

(Solved) Paging cookie issue in FetchXML – Dynamics 365

$
0
0

Recently while working in Dynamics 365 CRM we were facing the strange issue while retrieving more than 5K records using Web API with FetchXML

The issue was when we retrieved more than 5K records using Web API with FetchXML, it was returning the same paging cookie all the time as shown below.

"<cookie page="1"><fullname last="D. DAVID" first="FRAN HUANG" /><contactid last="{A5CB5C32-
1F60-E811-80D3-00155D061C08}" first="{ECA45C32-1F60-E811-80D3-00155D061C08}" /></cookie>"

Because of this it was retrieving the same records again and again and the process was going into a loop and it never completed. We spent a few hours to find a solution to this but initially, we did not get any clues. Initially, we thought this may be because of 4-5 link entities in that FetchXML but that was not the case. After digging deep into it we found the exact cause of this issue & then the solution for it.

This issue has occurred because we have created one field on contact entity and the value in this field got populated by the plug-in. And we have registered that plugin on Retrieve Multiple messages and read value from other entity and set that value in this field and shown it to the user, but we were not saving the value of this field in the database. This field is like a virtual field. So in this case that is the reason it was giving the same paging cookie each time.

When we removed this field from FetchXML and executed using Web API then it starts working. We got the next paging cookie so it retrieves all records.

Hope this helps.

Improve the user adoption of Dynamics 365 by monitoring user activity within CRM


Viewing all articles
Browse latest Browse all 3363

Trending Articles



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