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, ...
Answered

Create Trade Agreement Journal Lines

(0) ShareShare
ReportReport
Posted on by 131
Hi all,
 
I am trying to create Trade Agreement Journal Lines in D365 FO via a REST APIs - currently I'm testing in Postman.
 
I can successfully create the Journal Header and retrieve the Journal Number by performing:
 
POST: /data/TradeAgreementJournalHeaders?cross-company=true
 
And in the body I put:
 
        {
            /dataAreaId/: /A123/,
            /JournalDescription/: /Purchase Price Test/,
            /DefaultTradeAgreementType/: /Purch/,
            /TradeAgreementJournalNameId/: /P_Price/
        }
In the response I receive the newly created Journal Number that I will pass in the Journal Line.
 
But which Entity do I POST to then create the Lines?  I've had a look at the below Entities via Postman but they do not contain Trade Agreement Journal Lines:
 
 
Can anyone assist or point me in the right direction?
I have the same question (0)
  • Suggested answer
    Anthony Blake Profile Picture
    2,926 Super User 2025 Season 2 on at
    Take  look at:
     
    OpenSalesPriceJournalLine
    OpenPurchasePriceJournalLine
     
    Both reference PriceDiscAdmTrans Table which is where I think you will want your lines to go.
     
    There are additional entities for discounts and multi-line discounts, all point back to PriceDiscAdmTrans Table (in the most part)
     
    OpenSalesLineDiscountJournalLine
    OpenSalesMultiLineDiscountJournalLine
    OpenSalesTotalDiscountJournalLine
     
    OpenPurchaseLineDiscountJournalLine
    OpenPurchaseMultiLineDiscountJournalLine
    OpenPurchaseTotalDiscountJournalLine
     
     
  • Michael Hutcheson Profile Picture
    131 on at
    Thanks for the reply.
     
    I have tried performing a GET to the two URI's but they don't appear to exist:
     
    "Message": "No HTTP resource was found that matches the request URI 'https://xxxxxxxxxxxxx/data/OpenPurchasePriceJournalLine?cross-company=true'. No route data was found for this request."
     
    "Message": "No HTTP resource was found that matches the request URI 'https://xxxxxxxxxxxxx/data/OpenSalesPriceJournalLine?cross-company=true'. No route data was found for this request."
     
    Regards,
     
    Michael
  • Verified answer
    Anthony Blake Profile Picture
    2,926 Super User 2025 Season 2 on at
    Add the letter s to the end:
     
    OpenSalesPriceJournalLines
    OpenPurchasePriceJournalLines
     
    If your ever looking for exactly what's available in your environment by the way, query the data endpoint without any criteria, and the response will contain all available entities:
     
    https://xxxxxxxxxxxxx/data

    e.g.
    ...
    {
          "name":"OpenPurchasePriceJournalLines","kind":"EntitySet","url":"OpenPurchasePriceJournalLines"
    }
    ​​​​​​​...
  • Michael Hutcheson Profile Picture
    131 on at
    Hello Anthony,
     
    That has worked thank you, and thanks for the tip that is useful to know.
     
    Regards,
     
    Michael

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

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans