Recently, Microsoft pushed the 2021 Wave 1 release on all of our Dynamics 365 online environments.
And it introduced a breaking change!
For many versions we could write QueryExpression queries and specify no columns at all or omitting the default primary key column, knowing the Entity records returned always have the Id attribute populated.
Not any more! When a QueryExpression does not specify the primary key column explicitly, the Id property equals Guid.Empty.
Since this change in behavior affects a lot of basic software components I am wondering: anyone else experienced this behavior? Could we expect this, i.e. is this documented behavior or simply a nasty error?
Hello,
I wrote a simple console app and I can't reproduce this behavior. Can you please tell what's the version of the instance you can reproduce the issue you describe, provide the brief code and your scenario?
Here is what I have:
Version: 9.2.21035.00186
Scenario: Console application that gets 10 first accounts.
Code:
var connString = ConfigurationManager.AppSettings["CrmConnectionString"]; var service = new CrmServiceClient(connString); var query = new QueryExpression("account") { ColumnSet = new ColumnSet(false), TopCount = 10 }; service.RetrieveMultiple(query).Entities.ToList().ForEach(a => System.Console.WriteLine(a.Id));
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156