I add a field as an entity extension. The field appears correctly along with its value in staging table, but when I check the table that stores the data in system after import, the value is not updated.
Notes:
1- I did create a table extension for staging table.
2- I did refresh entity list
3- I did regenerate entity mapping
Yes, that method solves my problem. Basically what I have to do is to import enumerations lines and the parent table will be created automatically with IsEnumeration=Yes.
Thank you very much Mr. Nikolaos.
Whoops, sorry, that code is in EcuResProductAttributeEnumerationValueType entity ("Product attribute enumeration types"). Could you use that to solve your business requirement?
Please try to insert data to this entity via x++. Does the field work correctly in that case?
No unfortunately, same issue happens. All values are inserted except for isEnumeration.
By the way, if you look at the standard entity, this field is populated automatically via code, in method mapEntityToEcoResAttributeTypeDataSource
I didn't find that method inside the standard entity.
Are you sure you even should try to set this field directly via your entity extension and a public field?
Well if I didn't add it directly that means the user will need to check every record and edit the field manually instead of just importing the file, which is what I'm trying to avoid.
Ah, sorry, I missed the fact that the filter is part of the standard entity.
Please try to insert data to this entity via x++. Does the field work correctly in that case?
By the way, if you look at the standard entity, this field is populated automatically via code, in method mapEntityToEcoResAttributeTypeDataSource.
Are you sure you even should try to set this field directly via your entity extension and a public field?
First of all thanks for the advice regarding the field name, I'll change it to abide to the naming guidelines.
Regarding the issue with the entity, I can't remove the filter to test whether it is causing the issue since this is an extension. I checked the mapping and everything seems correct.
Moved to D365 SCM forum.
You can definetely test the impact of the range yourself. Please do and let us know the result.
But, I'm quite sure that a filter doesn't have impact to mapping of a single field.
If I had this kind of issue, I would start by checking the mapping in the data project / entity.
By the way, when you add your new fields to existing tables/entities, remember to use your own prefix in the field name! Otherwise you risk having serious trouble with future MS updates.
Update:
I caught a possible cause for the issue. There's a filter in EcoResAttributeType that says (IsEnumeration==No).
This filter will definitely will effect data export, but is it effecting import as well?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156