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 :
Small and medium business | Business Central, N...
Suggested Answer

Business Central Patch/POST

(0) ShareShare
ReportReport
Posted on by

Hi

I am building custom API (Odata) for updating budget lines for a project (Job). I created an API and able to POST few lines in respective table.

I would like to know if there is any specific API property to be used to enable PATCH in API code? Any one knows please? Thank you in advance 

    PageType = API;
    Caption = 'manageProjectBudgetAPI';
    APIPublisher = 'myapi';
    APIGroup = 'apigrp';
    APIVersion = 'v2.0';
    EntityName = 'manageProjectBudgetAPI';
    EntitySetName = 'manageProjectBudgetAPI';
    SourceTable = "Budget Line";
    InsertAllowed = true;
    ModifyAllowed = true;
    DeleteAllowed = false;
    Extensible = false;
    DelayedInsert = true;
    ODataKeyFields = "SystemId";

Regards

Famy

I have the same question (0)
  • Lars Lohndorf-Larsen Profile Picture
    on at

    Hello,

    PATCH should be enabled - but of course you need to specify in the api call what record to patch. Specify the record in the URL:

    PATCH

    MyPC:20048/.../customers(e4e15d57-eac7-ec11-bb8d-000d3abbf69d)

    BODY:

    {
    "displayName""The Cannon Group PLC"
    }
    If you get error
    "Invalid Request Body  CorrelationId: 
    then add this header:
    Content-Type = application/json
    If you get this error:
    "Could not validate the client concurrency token required by the service. Please provide a valid token in the client request
    Then add this header:
    If-Match = *
    You can of course ideally also add the actual concurrency token (etag) to check that the record was not modified since you retrieved it, but just for testing start with *.
  • Suggested answer
    Javier.Armesto Profile Picture
    14 User Group Leader on at

    It is enabled. You could check and try Postman, you will find it easier to see and compose the call. In the link that I leave you will see that the property that enables PATH is modified allowed.

    docs.microsoft.com/.../devenv-api-pagetype

    Check the response so you can help the community. Tap like for additionally. Thank you

  • Suggested answer
    Community Member Profile Picture
    on at

    Thank you, it is useful information 

  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    8,760 on at

    Hi Digitech,

     

    Your API looks OK. Just add a "If-Match" equals to * (asterisk) to your request header.

    pastedimage1660382866940v2.png
    pastedimage1660382874852v3.png


  • Suggested answer
    YUN ZHU Profile Picture
    95,483 Super User 2025 Season 2 on at

    Hi, just adding some info.

    https://yzhums.com/6117/#toc15

    Hope this helps as well.

    Thanks.

    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,064

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,568 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans