Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Unable to update a field data in "Sales_Prices" in BC

(0) ShareShare
ReportReport
Posted on by 15

request Action:PATCH

request url: api.businesscentral.dynamics.com/.../Sales_Prices(Item_No ='100001', Sales_Type ='Customer Price Group' , Sales_Code ='BH' ,Currency_Code ='BHD' ,Variant_Code = ' ', Unit_of_Measure_Code = 'NOS', Minimum_Quantity ='0',Starting_Date= '0001-01-01')

request Body: 

{
    "Mageno_Sync": true
}
response:
{
"error": {
"code": "BadRequest_NotFound",
"message": "Bad Request - Error in query syntax. CorrelationId: df27ae4d-a122-489e-9d1c-6f4eee092f99."
}
}
I tried with another request body:
request url: 
api.businesscentral.dynamics.com/.../Sales_Prices eq '100001' and Sales_Type eq 'Customer Price Group' and Sales_Code eq 'BH' and Currency_Code eq 'BHD' and Variant_Code eq '' and Unit_of_Measure_Code eq '' and Minimum_Quantity eq 0
request body: 
{
    "Mageno_Sync": true
}
response:
{
"error": {
"code": "BadRequest_MethodNotAllowed",
"message": "'PATCH' requests for 'Sales_Prices' of EdmType 'Collection' are not allowed within Dynamics 365 Business Central OData web services. CorrelationId: def90d9b-6bd7-47fd-bea0-d1bee46477c1."
}
}
Can anyone tell me what is the wrong thing or missing part in the request body and URL?
I tried doing this using postman but was unable to do so. As I have checked there are 8 primary keys that are being sent in the URL.
  • Suggested answer
    JAngle Profile Picture
    89 on at
    RE: Unable to update a field data in "Sales_Prices" in BC

    Try it without the field references perhaps. System knows the primary key fields it just needs the data in the correct format to slot into that.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 290 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 196

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 156 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans