web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to create and post trade agreement journal by code

(0) ShareShare
ReportReport
Posted on by

Hello,

Does anybody have a snippet of code to create purchase trade agreements?

Googling just gives some examples of AX2012 and classes used there do not exists anymore.

What classes should be used?

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: How to create and post trade agreement journal by code

    Hi DAX Dev,

    Is RPA that is part of PowerAutomate an alternative codeless option for you?

    Best regards,

    Ludwig

  • Suggested answer
    Vishal Dhavgaye Profile Picture
    405 on at
    RE: How to create and post trade agreement journal by code

    Hi DAX dev,

    There is out of box entity 'PurchasePriceAgreementEntity' provided to create trade agreement for purchase.

    you can create data management project with this entity and provide the menu to user for import.

    If you are getting trade agreement from some other integration source, you can set the field values for this entity and call insert.

    Check if you able to solve this without customization. 

  • DAX Dev Profile Picture
    on at
    RE: How to create and post trade agreement journal by code

    Hello,

    We recieve csv files for released products and import it via a customized isv tool.

    During this import we should also create trade agreements.

  • WillWU Profile Picture
    22,361 on at
    RE: How to create and post trade agreement journal by code

    Hi DAX Dev,

    Trade agreements broadly revolve around three main tables, PriceDiscAdmTable, PriceDiscAdmTrans and PriceDiscTable and posting is handled via class PriceDiscAdmCheckPost.

    Have a look at this blog:

    http://axwiki.blogspot.com/2018/06/code-to-create-trade-agreement-in-d365.html

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at
    RE: How to create and post trade agreement journal by code

    why to write code when you can post in batch.

    is it for interfaces?

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: How to create and post trade agreement journal by code

    Hi,

    To add on to what Rahul mentioned, you can import those journals using electronic reporting without coding. Alternatively you can use DMF. Posting of the journals can be done as well without coding by making use of the PowerAutomate RPA functionality.

    Would be great if you have a look at those standard features.

    Best regards,

    Ludwig

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at
    RE: How to create and post trade agreement journal by code

    hope you are saving writing code and using DMF

    pls suggest if our responses helped

  • steven Profile Picture
    5 on at
    RE: How to create and post trade agreement journal by code

    Hi Ludwig,

    Can you provide and example or or a link to an example of the Power Automate process for this?  

    Thank you, 

    Steven

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,167

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 617 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans