Personalized Community is here!
Quickly customize your community to find the content you seek.
Latest TechTalk Videos
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have a field table where allow edit on create & allow edit propertied are false at table level , a data entity for integration was created for this table and I need this field to be editable at entity level , I set the data entity field properties allow edit on create & allow edit to true and regenerate the staging table when I try to assign value for this field I face the below error , how field table property can be adjusted at data entity level ?
A row created in data set was not published. Error message: 'Write failed for table row of type 'XXXXXX'. Infolog: Warning: insert not allowed for field 'XXXXX' /// error in case pf insert new record
A row created in data set was not published. Error message: 'Write failed for table row of type 'XXXXXX'. Infolog: Warning: update not allowed for field 'XXXXX' /// error in case pf insert new record
"In Data Mangement > Data Entites, search your Entity, and clic Modify Target Mapping, in Mapping Details, the last column is Call Validate Field Method."
I try this it does not work
If the table field is blocked for manual entry, then there is a reason for this. When getting data from a source file, it is also considered as manual entry for this field on table level. Can you tell the table and field you want to fill? Probably, you can create a new virtual field and move the value to the field using the data entity method mapEntityToDataSource().
is it a customized table not standard , what you mean by table field is blocked for manual entry? you mean it is bounded field ?
I try to add the following line of code to method : persistEntity , and it works with me but I have a repeat some of validation point added at this level to data entity level,, validate field function
Is this solution ok i.e. set skipDataSourceValidateField to true ?
If it is a customized table, what is the reason for having allow edit and allow edit on create to false on a certain field on the table? Can you also explain some more as your last comments are not really clearly explaining the situation.
PS blocked for manual entry is the result of having allow edit and allow edit on create set to false. In that case a user can't update it directly on a form. It can only be managed with coding.
This field expected to be filled in case of integration from third party only so it is not allowed to be filled manually .
the solution that I use ( it resolves the issue but I am not sure if it causes some problem or missing ) : this.skipDataSourceValidateField(fieldNum(XXXX,XXXX),true); ,// this line of code added to data entity method persistEntity
Now I can fill the field from data entity after making the properties allow edit and allow edit on create true
If it should not be editable via the user interface, but should be editable via entity, then you can also set AllowEdit:No on the form data source field instead of table field.
But please be aware that if the field can be edited using a data entity, users can also edit it via Excel (since it's also using data entities to connect to D365).
I know that I can handle table field property in different ways , my question now , regarding the resolution that I find , is it ok or not ?
It is a solution, however as mentioned by Nikolaos, there is a risk. In case users do have rights on the data entity, they can modify data via the data management framework, the Excel connector or Power Automate.
Is there a way to distinguish the source in data entity level so that I can validate against it, to avoid such risk?
You can't distinguish the source, but you can manage user permissions to avoid wrong use. If you only grant full access to a service account and no access or only read access for normal business users, you have mitigated the risk.
Business Applications communities