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 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!

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Maprntitytodatasource- to map inbound field to underlying target datasource

    Updateentitydatasource - if you want to update any other table or record after creation the. You can override this method

    MapdatasourcetoEntity- if you want to write any custom logic while exporting data out of the system you can override this method

  • Saurabh_star Profile Picture
    on at

    Hi Sukrut,

    If I need to update a field in SalesTable after import (Sales Order Header V2 Entity) based on some business logic, what's the best place to put the code? The field is not part of the data entity.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Try PostLoad method

  • Suggested answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    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.

  • Saurabh_star Profile Picture
    on at

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

  • Vishal Dhavgaye Profile Picture
    405 on at

    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.

  • Ahmed Osama Ibrahim Profile Picture
    332 on at

    What is definition of data entity ?

    is it classes that responsible of export and import  

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

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

  • Mark JZ Yeap Profile Picture
    240 on at

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

  • nmaenpaa Profile Picture
    101,162 Moderator on at

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