Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to update Purchase Price Trade Agreement Item Prices via API \ Postman

(1) ShareShare
ReportReport
Posted on by 125
 
Hi folks,
 
I have a requirement to update Purchase Price Agreement Items that are on a Posted Trade Agreement  via an API - so far I am testing in Postman.
 
I can perform the GET to see what the data looks like and retrieve the Entity key (RecordId)
 
GET: /data/OpenSalesPriceJournalLines?cross-company=true
 
I then try a PATCH:
 
PATCH: /data/PurchasePriceAgreements(RecordId=123456789)?cross-company=true
 
Body:
        {
            /Price/: 52.12
        }
 
But I keep receiving the message:
 
{
    /Message/: /No HTTP resource was found that matches the request URI 'https://xxxxxxxxxxxx/data/PurchasePriceAgreements(RecordId=123456789)?cross-company=true'. No route data was found for this request./
}
 
Is it actually possible to update the purchase price of an item on a Posted Trade Agreement?  
 
Thanks,
 
Michael
  • Michael Hutcheson Profile Picture
    Michael Hutcheson 125 on at
    How to update Purchase Price Trade Agreement Item Prices via API \ Postman
    Not sure if its a bug, but when you patch the product price, and only pass the price in the body, it sets the PriceSiteId to blank i.e. ""  - thus updating the original value to blank
  • Michael Hutcheson Profile Picture
    Michael Hutcheson 125 on at
    How to update Purchase Price Trade Agreement Item Prices via API \ Postman
    Thank you that has worked.
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,370 Most Valuable Professional on at
    How to update Purchase Price Trade Agreement Item Prices via API \ Postman
    You need to use two fields to identify the record: DataAreaId and RecordId, i.e. PurchasePriceAgreements(DataAreaId='abc',RecordId=123456789).

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans