Hi
when we use service.RetrieveMultiple() in our plugin there are two properties people check:
what does exactly mean by TotalRecordCount ?
what does exactly mean by Count ?
when TotalRecordCount can be null instead of -1 ?
In my case i have one record in my collection and above mentioned properties showing following result: can any one explain please.
ent.TotalRecordCount -1
ent.Entities.Count 1
Thank you in advance.
*This post is locked for comments
Hi Zuab ,
Please find the answers -
what does exactly mean by TotalRecordCount ?
To find out how many records the query returned, set the ReturnTotalRecordCount property to true before executing the query. When you do this, the TotalRecordCount will be set. Otherwise, this value will be -1. You can pass this parameter like below -
PagingInfo.ReturnTotalRecordCount
For more info check below reference -
docs.microsoft.com/.../gg334688(v=crm.8)
docs.microsoft.com/.../gg307670%28v%3dcrm.8%29
what does exactly mean by Count ?
Count is gives you the number of records available in the EntityCollection.
when TotalRecordCount can be null instead of -1 ?
When you set ReturnTotalRecordCount property then it will set TotalRecordCount with number of records retrieved and when you do not set ReturnTotalRecordCount property by default it will always return -1.
Hope this helps.
If ReturnTotalRecordCount property was false when the query was executed, the value of TotalRecordCount property will be -1.
[View:https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg326940(v%3Dcrm.8)]
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156