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

  • Suggested answer
    YUN ZHU Profile Picture
    85,670 Super User 2025 Season 1 on at
    RE: Business Central Patch/POST

    Hi, just adding some info.

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

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    1,207 on at
    RE: Business Central Patch/POST

    Hi Digitech,

     

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

    pastedimage1660382866940v2.png
    pastedimage1660382874852v3.png


  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Business Central Patch/POST

    Thank you, it is useful information 

  • Suggested answer
    Javier.Armesto Profile Picture
    14 User Group Leader on at
    RE: Business Central Patch/POST

    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

  • Lars Lohndorf-Larsen Profile Picture
    on at
    RE: Business Central Patch/POST

    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 *.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans