Notifications
Announcements
No record found.
Hello, everyone!
Can you explain, what is the great purpose for next methods:
mapEntityToDataSource
updateEntityDataSource
mapDataSourceToEntity
In the context of Import job?
Thank you!
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
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.
Try PostLoad method
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.
there is another method postTargetProcess(), both serves the same purpose? any pros and cons?
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.
What is definition of data entity ?
is it classes that responsible of export and import
Ahmed, please look at Data entities overview. If you have more questions, please create your own thread with an appropriate title and tags.
One of these three will accomplish the requirement of "allows override of data after it has been inserted into target entity?
Hi Mark,
didn't you already ask the same question here, and mark the answer as verified?
community.dynamics.com/.../i-have-imported-the-data-successfully-using-data-management-in-d365fo-i-want-to-check-if-it-is-possible-to-overwrite-the-method-after-data-is-imported-successfully
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.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.