Todays troubleshooting was for a customer where we are implemnting DualWrite. When one of my colleagues was changing then owner of an account in Dynamics 365 CE, the got the following error:
{"Write failed for entity Customers V3 with unknown exceptionFor information on troubleshooting see https://go.microsoft.com/fwlink/?linkid=2244045. - Worker does not belong to the current legal entity\nvalidateWrite failed on data source 'CustTable (CustTable)'"}
This was a bit strange I thought… We are not even synchronizing Owner – Employee Responsible because we had not gotten around to it yet (because of reasons).
I asked the colleague for a couple of example accounts that I could have a look at to try to figure it out.
First I looked at the user we are trying to add as an owner. The user belonged to the correct Business Unit in CRM and the user also belonged to the correct Legal Entity in Dynamics 365 for Finance and Supply Chain… Really Strange.
I the looked at the customer in FnO and noticed that there was a user set as Employee Responsible on the customer under Sales Demografic. The user was not the same as the user I was adding from CE, so I simply tried to delete it and then I tried to save the Account in D365 CE. SUCCESS!
I looked at one of the other customers in FnO and noticed that there was an Employee Responsible set on that customer, I removed it and try to change Account in D365 CE, and it worked…
I looked at another customer… Turns out the customer had a worker set as an Employee responsible, but the employee was no longer employed at the company. Remove it and it works
There are two learnings from this issue; “even if you get an error in CE when you are doing a change in CE, the issue might be totally unrelated to CE”, “data quality is important” and finally “FnO does not clean out employees that has left the company”
That is it for now