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?
Hi DAX Dev,
Is RPA that is part of PowerAutomate an alternative codeless option for you?
Best regards,
Ludwig
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.
We recieve csv files for released products and import it via a customized isv tool.
During this import we should also create trade agreements.
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
why to write code when you can post in batch.
is it for interfaces?
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.
hope you are saving writing code and using DMF
pls suggest if our responses helped
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,167
André Arnaud de Cal... 867 Super User 2025 Season 2
Sohaib Cheema 617 User Group Leader