Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Answered

New field in entity extension is not updating in corresponding table after import

(0) ShareShare
ReportReport
Posted on by 509

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.

3603.pastedimage1614513057566v3.png

5314.pastedimage1614513086260v4.png

3755.pastedimage1614513102056v5.png

Notes:

1- I did create a table extension for staging table.

2- I did refresh entity list

3- I did regenerate entity mapping

  • atajjo Profile Picture
    atajjo 509 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: New field in entity extension is not updating in corresponding table after import

    Whoops, sorry, that code is in EcuResProductAttributeEnumerationValueType entity ("Product attribute enumeration types"). Could you use that to solve your business requirement?

  • atajjo Profile Picture
    atajjo 509 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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.

     

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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?

  • atajjo Profile Picture
    atajjo 509 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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.

    docs.microsoft.com/.../naming-guidelines-extensions

  • atajjo Profile Picture
    atajjo 509 on at
    RE: New field in entity extension is not updating in corresponding table after import

    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?

    4743.pastedimage1614582123551v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans