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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Export all enums over ...
Finance forum

Export all enums over data entity to BYOD

(0) ShareShare
ReportReport
Posted on by 65

Good morning dear colleagues,

I have such a question,

can I export all enums and all enums values from D365 using data entity to BYOD using Data Management?

I tried to create a new table BYODEnums then I have created a data entity  BYODEnumsEntity with my table as a datasource,

this table and date entity has such fields: 

Enum Name, Enum Element, Enum Label

I have two questions:

1) I can add code to loop through all enums and populate my table, but, I could not find some method(something like initDataEntity) in data entity to populate my BYODEnums table so system can export it. What is the method to fill up my table?

1) Is this a good approach?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,030 Super User 2025 Season 2 on at
    RE: Export all enums over data entity to BYOD

    Hi Volodymyr,

    What is the purposes of having these enums in BYOD?

    Initializing during export is not a good idea. It would be better to create a batchable class which can do the actual loop from the AOT dictionary and save values in your new table. Then you can use standard data management to export to BYOD.

  • Volodymyr Pavlovskyi Profile Picture
    65 on at
    RE: Export all enums over data entity to BYOD

    Hi  Andre :),

    thank you for your answer, I also thought about creating a batch job to have all data populated, but the initial task was to have a "data entity which will export all enums", if I start suggesting batch job I will also need to answer a question "Why just not to populate a table while initializing of data entity?", and I need to answer this somehow,  can you please explain to me what did you mean by :"Initializing during export is not a good idea. " so I can suggest a batchjob as a better approach?

    We have a bunch of data entities exporting data from the custom tables that we have created in our solution, which will be latter on used by third-party system - the enum table will be used to get a enum label , that why I want to export enum table with fields like: EnumType: (e.g. SalesStatus), EnumName: (e.g. Backorder), and Enumlabel (e.g.:"Open order")

  • Volodymyr Pavlovskyi Profile Picture
    65 on at
    RE: Export all enums over data entity to BYOD

    Hi Andre, thank you for your suggestion to move it to batch job,

    I have added all available methods to data entity and during export nothing is called , only PostLoad for every row. In fact for empty table no calls for data entity methods at all.

    Can you please also explain what did you mean by :"Initializing during export is not a good idea."? as I don't see the difference .

  • Verified answer
    André Arnaud de Calavon Profile Picture
    299,030 Super User 2025 Season 2 on at
    RE: Export all enums over data entity to BYOD

    Hi Volodymyr,

    It would be a better approach to split the compilation of available enums and the data entity. The data entity is intended to export or import data only. Not also running a job to collect a large number of records before exporting it.

    So if you have a batch job to collect the enums in a certain table, you can use a standard data entity without additional logic.

  • Volodymyr Pavlovskyi Profile Picture
    65 on at
    RE: Export all enums over data entity to BYOD

    Just to complete the answers here I will share my findings so far in case anyone else will open this page with intention to find some answers

    .

    There is also a standard table which is called RetailEnumValueTable

    And a class called RetailConnSeedDataGenerator

    If user clicks Retail Parameters Initialize, the system will fill up RetailEnumValueTable.
    This table can be used to create a data entity, or the logic can be duplicated in a custom table\class.

    Also please note that standard ENUMIDTABLE and ENUMVALUETABLE which may be found in SQL within D365 database are not full.
     RetailSetup.JPG

  • Suggested answer
    Ajit Profile Picture
    8,755 on at
    RE: Export all enums over data entity to BYOD

    There is a table called 'SRSAnalysisEnums' it has all Enum details, you can create an entity out of that. It is very useful if people querying out of the BYOD and they don't know about that label of enum values.

  • Community Member Profile Picture
    on at
    RE: Export all enums over data entity to BYOD

    Is the "Use Enum label" not applicable to BYOD exports?

    pastedimage1623324013403v1.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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans