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 | Project Operations, Human Resources, ...
Unanswered

When to use postTargetProcess method for an entity?

(0) ShareShare
ReportReport
Posted on by 1,967

Hi,

When should this method be used?

From what I understood it gets called after the records have been actually inserted. So if I want the insert to an entity to fail if code inside this method throws errors, it won't fail the insert?

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

    No, this method isn't used for a validation. You wan't to validate data of a record before you save it, not to run validation after everything was already saved.

  • .. Profile Picture
    1,967 on at

    Hi Martin,

    What are examples to use this method for?

    And what's the difference between mapEntityToDataSource

    When to use each one?

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    I think you might refer to the below article for postTargetProcess:

    "This method is automatically called by the DMFEntityWriter class in the end of processRecords() method when all records are transferred from staging to target"

    community.dynamics.com/.../ax-7-process-the-data-after-data-entity-import

    mapEntityToDataSource from my point of view is more for after the record is inserted into entity DS. I remember this one is more for Virtual field logic. Please correct me if I'm wrong

    Regards,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans