Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance forum

Data entity methods

(0) ShareShare
ReportReport
Posted on by

Hello, everyone!

Can you explain, what is the great purpose for next methods:

mapEntityToDataSource

updateEntityDataSource

mapDataSourceToEntity

In the context of Import job?

Thank you!

  • Martin Dráb Profile Picture
    231,754 Most Valuable Professional on at
    RE: Data entity methods

    It depends on what exactly you mean by that. Please create a new thread and explain your actual problem in detail there.

    In general, mapDataSourceToEntity() isn't applicable if you're talking about data import. And updateEntityDataSource() may not be applicable if you're interested just in inserts and not updates (which is unfortunately not completely clear from your description).

  • Mark JZ Yeap Profile Picture
    240 on at
    RE: Data entity methods

    Yes.

  • nmaenpaa Profile Picture
    101,156 Moderator on at
  • Mark JZ Yeap Profile Picture
    240 on at
    RE: Data entity methods

    One of these three will accomplish the requirement of "allows override of data after it has been inserted into target entity?

  • Martin Dráb Profile Picture
    231,754 Most Valuable Professional on at
    RE: Data entity methods

    Ahmed, please look at Data entities overview. If you have more questions, please create your own thread with an appropriate title and tags.

  • Ahmed Osama Ibrahim Profile Picture
    332 on at
    RE: Data entity methods

    What is definition of data entity ?

    is it classes that responsible of export and import  

  • Vishal Dhavgaye Profile Picture
    405 on at
    RE: Data entity methods

    Hi Saurabh,

    Did you tried 'mapEntityToDataSource' method as Martin suggested, you should be able to write your business logic based on imported values in this method.

  • Saurabh_star Profile Picture
    on at
    RE: Data entity methods

    there is another method postTargetProcess(), both serves the same purpose? any pros and cons?

  • Suggested answer
    Martin Dráb Profile Picture
    231,754 Most Valuable Professional on at
    RE: Data entity methods

    postLoad() is called after fetching data from database, which doesn't look useful in this case.
    mapEntityToDataSource() sounds like a more appropriate place for the business logic. You can find examples in standard entities. For instance, CustCustomerEntity uses mapEntityToDataSource() to fill in MainContactWorker based on the value of EmployeeResponsibleNumber.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,682 Moderator on at
    RE: Data entity methods

    Try PostLoad method

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,754 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans