microsoft / PowerPlatform-DataverseServiceClient

Code Replica for Microsoft.PowerPlatform.Dataverse.Client and supporting nuget packages.
MIT License
281 stars 51 forks source link

Microsoft.PowerPlatform.Dataverse.Client0.5.5: owner field cannot update after #185

Closed msEvanLuo closed 3 years ago

msEvanLuo commented 3 years ago

we cannot update field "ownerid" from Microsoft.PowerPlatform.Dataverse.Client0.5.X by following code. However, when we use Microsoft.PowerPlatform.Dataverse.Client0.4.5, field "ownerid" can be update. any expanlation?

                    var cdsConnection = "xxxxxxxxx"
                    IOrganizationService _organizationservie = new ServiceClient(cdsConnection);
                    Entity entity = new Entity("a");
                    entity["new_name"] = "entityName";
                    entity["ownerid"] = new EntityReference("systemuser", new Guid("bc05679c-1911-ec11-b6e6-000d3a8039dd"));
                    _organizationservie.Create(entity);
bthuen commented 3 years ago

I have experienced the same thing. Both on version 0.5.5 and 0.5.7. Updating owner on a custom activity entity.

siyangzzz commented 3 years ago

the same question,both create and update ownerid can not be updated,so,the only solution is that we roll back Microsoft.PowerPlatform.Dataverse.Client to 0.4.5?

MattB-msft commented 3 years ago

We have identified the issue and are working to solve it now...

By way of explanation, At its root its a problem with how the Owner types are described in the metadata system and how that relates to the WebAPI interpreter in dataverse, There is a good deal of variability in how something is described in the WebAPI, which is leading to these sorts of issues.

if you need to work right now, you can use the ServiceClient.UseWebAPI = false flag, which will bypass the problem.

MattB-msft commented 3 years ago

Fix for this should be out on 10/21