web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Invalid enum value error while importing file in DMF in d365 fno

(0) ShareShare
ReportReport
Posted on by 50

I have created a enum field IsFixedAsset in table InventTable and added it in ReleasedProductV2 entity after ecxtending it and also added the same field in staging table EcoResReleasedProductV2Staging. 

I am getting the error of invalid enum value while importing the file after updating the value in this enum field .

Please guide me the step to solve this error. If string conversion to enum is require which should be the correct method or class to write the command .

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Export some data that has this new enum value to get an example of how it should look like.

  • D365 FnO Developer Profile Picture
    50 on at

    Hello ,

    I have exported the data of this entity . The value of this enum is exported as Yes/No

  • WillWU Profile Picture
    22,361 on at

    Hi D365 FnO Developer

    You should add a "string" field instead of the Enum in your staging table.

    The enum field in the target entity is represented by a string field in the staging table. You must create a new EDT of the string type that is of appropriate length to hold the enum label strings. The conversion between the enum field in the target entity and the string field in the staging table is handled automatically by the Data Import/Export Framework.

    refer to:docs.microsoft.com/.../create-a-custom-target-entity-for-the-data-import-export-framework-dixf-dmf

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Good.

    Now the next step is to use this learning in import. Could you do it, and let us know how it goes? Thanks!

  • D365 FnO Developer Profile Picture
    50 on at

    I have added the string edt field in staging table. It is imported now .

    Now after importing the file with updated  value YES in this field , it is saving as NULL value in odata entity and also in form .

    Any help in this would be appreciated .

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    I suggest you to take a look at the standard entities and how enums are handled.

    They are not string fields so the previous suggestion was not correct.

    Just drag the actual enum field from your entity data source to the entity field list.

    And copy-paste the enum field from your table (extension) to the staging table (extension).

    I think you already had it like this. But I guess that you just tried to use some wrong value in import. I have to guess because I don't have information about it.

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    I suggest you follow how the standard entity handles it. In the same EcoResReleasedProductV2Entity check field 'UpdateProductVariantLifecycleState' for your reference. Making it string isn't correct.

  • D365 FnO Developer Profile Picture
    50 on at

    I have kept the property of my new custom enum field as same as updateproductvariantlifecyclestate  field . Then I was getting error of invalid enum value.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    And what value were you trying to input in that field?

    Can you input the same value succesfully in UpdateProductVariantLifecycleState field?

  • D365 FnO Developer Profile Picture
    50 on at

    I just tried to update the value of this field UpadetProductVariantLifecucleState from NO to YES and import it . And got the same error of Invalid enum value for this . I guess there s oher way to import the updated enum value in DMF .

    Any help will be appreciated.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans