RE: Please be aware of the following important note when you are trying to synch data from D365 BC to D365 for Sales
Hello AJ,
We have not yet figured out all details. We are currently trying to recover one customer system that has not been able to synch Items for a while now. The error is:
“'ProductPriceLevel' entity doesn't contain attribute ‘statecode'”
In the current version of CRM tables there is no field “statecode” in table CRM Productpricelevel. It means we cannot use this field in our code in D365 BC / Dynamics NAV OnPrem releases. Then the error message “'ProductPriceLevel' entity doesn't contain attribute ‘statecode'” could mean that statecode is not filled in the price list line, but it is mandatory, so the insert fails. This only happens if PSA module is present. If PSA module is not present, synch does work beautifully well. Removing PSA module after it is installed and after it is being used as well, is not very easy to be done due to dependencies. That is where we are now.
We cannot fix the mapping to the not existing field. As you don't see it in the CRM tables we also don't see it. And our code cannot reference to this field because, again, it does not exist. It is not C/AL code that throws this error. In our opinion this error is produced by CRM, where some piece of code expect such a field to exist on attempt to add a new price list line.
NAV product group / CRM product group are closely working together to figure out what changes are made by the PSA module installer that overrides customization and requires a non existing field to be mandatory populated. Our focus currently is to recover this customer system and to avoid more customers getting into same very bad situation.