How to Solve “update not allowed for field” Error with Data Entries in Dynamics 365 Finance and Operations
While working with a Data entity for Dual-write and Data migration recently, I came across this error: “Results. update not allowed for field ‘’Personnel number(PersonnelNumber)””
Luckily, I was able to identify a workaround to help deal with this error.
First, I'll take a step back and show you the setup of my entity. The primary datasource in this entity is the Customer table with a read-only reference to the HCM worker table based on the RecIds.
This is a normal setup you see in any entities within Finance and operations. People will never know the actual RecID, so we create a link to the referenced table and expose the reference primary key field (in my case it is the Personnel Number). The internal logic will then query the correct value and set the RecId for you when inserted into the database.
In researching this issue, I found that the “Personnel Number” field is set to Allow Edit No. This is why I get the error within my data entity even though it is read-only.
The workaround for this issue is rather simple. In my data entity, I simply set the Allow Edit property to Yes for my PersonnelNumber field.
As soon as I made that property change the field validation passed and my entity executed properly. This change is a very low risk given the data source is read-only.
I hope this guide helps you if you encounter this issue during your development.
Please reach out to us! We have a team of experts ready to help you.