web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

RetrieveEntityChangesRequest not returning all fields on an entity

(0) ShareShare
ReportReport
Posted on by 32

We are migrating from CRM on prem to dynamics 365 and need to change the mechanism used to populate our data warehouse with change data. Previously we used SQL Server change data capture, which was extremely simple, but of course we don't have database access in 365. >:(

So, I am attempting to send a `RetrieveEntityChangesRequest` via a `CrmServiceClient` instead. The request appears to work successfully, and I do get a response, but if I iterate over the attributes in the returned entities, they do not contain all of the fields I specified in the request.Columns. If I use Query.ColumnSet(true) (to return all columns), I still don't get all of the fields I can see in the web UI (that is to say, in settings  > customizations > customize the system > entities > fields).

I considered the possibility that perhaps the RetrieveEntityChangesRequest only returns fields where a value has in fact changed, but this can't be the explanation, since I am not populating the request DataVersion property in my test code, which I believe should return "everything".

What am I missing?

Here is my test code.

         CrmServiceClient client = new CrmServiceClient
         (
            new Uri(@"https://myorghere.crm6.dynamics.com"),
            @"redacted",
            @"redacted",
            false,
            @"..\"
         );

         RetrieveEntityChangesRequest req = new RetrieveEntityChangesRequest();
         req.EntityName = "account";
         req.Columns = new Microsoft.Xrm.Sdk.Query.ColumnSet(true); // get all columns!     
         req.PageInfo = new Microsoft.Xrm.Sdk.Query.PagingInfo() {  Count = 1, PageNumber = 1};
         var resp = (RetrieveEntityChangesResponse)client.Execute(req);
         foreach (var item in resp.EntityChanges.Changes)
         {
            if (item.Type == ChangeType.NewOrUpdated)
            {
               var e = (item as NewOrUpdatedItem).NewOrUpdatedEntity;
               // our account entity has an "accountNumber" attribute, but it is not returned (and many other attributes are not returned either)
               foreach (var a in e.Attributes.OrderBy(a => a.Key))
               {
                  Console.WriteLine(a.Key);
               }
            }                 
         }
         Console.ReadKey();




I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Nagaraju_Matta Profile Picture

Nagaraju_Matta 121

#2
ManoVerse Profile Picture

ManoVerse 71 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans