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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Data entity method - when and where to use

(0) ShareShare
ReportReport
Posted on by 45

Hi experts,

I want to explore "data entity" more.

I know the basics of data entity but I don't have more understanding of data entity methods.

If you can provides some description/example about data entity methods (like how and where to use), it would be a great help.

Regards

Babita. 

I have the same question (0)
  • Martin Dráb Profile Picture
    238,740 Most Valuable Professional on at

    Which kind of methods? Standard framework methods? Your own methods? Computed column methods? OData actions?

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Sir,

    Can you describe it in detail? There are many methods.

    You can read this sequence of calls such as Odata action and DMF first to understand.

    http://daxtechies.blogspot.com/2019/03/d365-fo-method-calling-sequence-of-data.html

    About Entity-based validation behavior,please read this:

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/validations-defaults-unmapped-fields

  • microsoft d365 Profile Picture
    45 on at

    Thanks.

    I want to more about standard data entity method:

    Can you please provide more knowledge on below methods (if possible kindly provide some code example for better understanding)

    persistEntity()

    initializedEntityDataSource()

    insertEntityDataSource()

    mapEntityDataSource()

    mapDataSourceToEntity()

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Sir,

    First of all, they are both data entity record levels,


    insertEntityDataSource to insert data, Based on the sequence of calls provided to you, it comes after mapEntityToDataSource.
    In short, mapEntityToDataSource performs write operations and mapDataSourceToEntity performs read operations. You can read this thread to learn more.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/377612/what-is-the-purpose-of-mapdatasourcetoentity-method-in-dataentity

    About code, you can use Metadata Search. 

    0047534.PNG

  • microsoft d365 Profile Picture
    45 on at

    Thanks.

    As I mentioned I am new in D365 and I needs more detail about data entities methods for my understanding.

    If you can share/provide detail about followings method, it would be a great help.

    persistEntity()

    initializedEntityDataSource()

    insertEntityDataSource()

    mapEntityDataSource()

    mapDataSourceToEntity()

  • Verified answer
    Navneeth Nagrajan Profile Picture
    2,495 Super User 2026 Season 1 on at

    Hello,

    Following is the purpose of the methods:

    - persistEntity() - Used more as a data check and resolving those checks in data.

    - initializeEntityDataSource() - Initalizes the data source to be referenced in the entity based on the action performed.

    - insertEntityDataSource() - inserts data into the target table after validating the field mapping and the data to be inserted from the staging table

    - mapEntityDataSource() - map the fields from the staging table to the data source used in the entity. Used more for import operations.

    mapDataSourceToEntity() - Maps the fields from the datasource with the entity fields. Used during import operations after insertEntityDataSource.


    Thanks,
    Navneeth Nagrajan | Dynamics 365 Technical Consultant

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

    As you can see, most method names already indicate quite well what they do.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 590 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 349

#3
Diego Mancassola Profile Picture

Diego Mancassola 263

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans