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

Update Sales Order Line using the standard API

(0) ShareShare
ReportReport
Posted on by 170

Hi Experts,

Hope all are doing well.

I am facing an issue while update any field such as Ship-to Quantity or Description of Sales Order Line. Below are the detals.

URL: api.businesscentral.dynamics.com/.../{SandBox Name}/api/v1.0/companies(Company Id)/salesOrders(SalesOrder ID)/salesOrderLines(Sales Order Line Id)

BodyJson:

{
"description": "Test"
}

Error:

{
    "error": {
        "code""BadRequest_NotFound",
        "message""')' or ',' expected at position 5 in '(0e63e6a2-dc77-ea11-a813-000d3a871ef9-10000)'.  CorrelationId:  f3027dc0-acd0-409a-92d3-ac0c71743174."
    }
}
 
Did anyone face this before?
Thanks in advance.

  • Suggested answer
    keoma Profile Picture
    32,721 on at
    RE: Update Sales Order Line using the standard API

    the json code should look like:

    json.png_2D00_320x240.png

    beware of the correct usage of the braces.

  • Sunil1991 Profile Picture
    170 on at
    RE: Update Sales Order Line using the standard API

    Hi Lewis-H,

    The scenario is that, i have a third party application from which i push the sales order data to Business Central to create sales order. I have create the sales order successfully in business central using the standard APIs.

    Now, i want to post a partial shipment and invoice for that sales order through the APIs. To do so, i need to update the shipQuantity (Ship-to Quantity) on sales order line. So, when i trying to update it, is giving me the error i mentioned.

    Thanks,

  • Community Member Profile Picture
    on at
    RE: Update Sales Order Line using the standard API

    If you're unable to say what the code should do, you're not in a position to start coding. First, think about what you're trying to achieve from the functional point of view. If you don't know, go back to your functional consultant or whoever is responsible for these things on your project.

    When you know what you want to achieve, think about how. What should happen in the application at what time, what should be atomic operations, which objects are involved, which pieces of logic don't exist yet and so on.

    Only when you know what needs to be changed in the application, start writing code (if any is needed in the first place). Cover what you can and when you get stuck, come here and explain your problem. At the point, you'll be able to explain it.

    Admin

    Apps4rent | o365cloudexperts

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans