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, ...
Suggested Answer

Process to populate data in mytabloe without entering into Staging table

(0) ShareShare
ReportReport
Posted on by 198

Hi there, i got an requirement to populate data imported  through Data entities and  need to populate in my table without being entered into Staging table. As am new to Data entitied and DMF i request you to update me with the approach to achieve my requirement. In my case i had created MyTable and added some fields. Our client used to import retail orders which were going to be created Online Sales Orders in Dynamics through Sync Online Order process. My role is to populate that particular data into my table before creating SalesOrder. Our consultant insisted me to check RetailSalesTrans Table and postGetTargetData() method in D365. My question here is from which class  postGetTargetData() method is used so that i need to create extension for that class and need to call postGetTargetData() accordingly.  I request you to suggest the approach to complete my task and coding i need to use for my requirement. Thanks in advance

Regards,

Prem

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi premK6969,

    Just to better understand your requirement, you have an entity that imports orders and you need to create a records in your table during import based on staging data, but before orders are created?

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

    You can check the cross references of any method in the system (including postGetTargetData) by right clicking it in AOT and selecting "Find references". So far I'm not sure if I understand your requirement, and how staging tables are related to it.

  • premK6969 Profile Picture
    198 on at

    Hi Sergei, yes thats my requirement. Can you let me know the approach for that.  Thanks

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Prem,

    Can you describe the business requirement? Is it about moving data to your table instead of the sales order or should it still import in both?

    Are you using the retail statement to have the details imported with Commerce functionality or do you have an own data entity?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi premK6969,

    I guess your consultant means special static methods on the entity level, but I haven't heard about postGetTargetData method, maybe you can check methods

    preTargetProcessSetBased

    postTargetProcess

    ievgensaxblog.wordpress.com/.../

    ievgensaxblog.wordpress.com/.../

  • WillWU Profile Picture
    22,361 on at

    Hi premK6969,

    Are you talking about the postGetStagingData() method. You can extend the method and update Data entity staging table when you import data to D365FO.

    See:rahulmsdax.blogspot.com/.../update-data-entity-staging-table-data.html

    Also see the method's calls during import:

    defaultCTQuery

    copyCustomStagingToTarget

    postGetStagingData

    preTargetProcessSetBased

    postTargetProcess

    Anyway, I think it is unreasonable not to update the staging table when importing.

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

    I guess you could also hook into some methods on the Sales order side, such as insert. And if it's a retail order, populate your table.

    It really depends what exactly it means when you say "populate particular data into my table before creating SalesOrder".

    But, if you run your code before the insert method of sales table, then it's populated before the SalesTable is inserted.

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 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans