web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Change generalLedgerSetup allowPostingFrom and To with API?

(0) ShareShare
ReportReport
Posted on by
I want to change properties of the genaralledger setup (really just the posting from and to dates) via an API).
I have successfully done many things with the API, such as writing Journal data and GETting all manner of data.
Using Postman, I have tried all combinations of: generalLedgerSetup API, ODATA and Page 118 exposed as Allow Write, setting if-match (tried various etag formats),  setup ID in the URL, etag ID in if-match, asterisk in if-match, no if-match at all etc etc. I believe the simple body JSON is fine - and is: { "allowPostingFrom": "2026-01-01", "allowPostingTo": "2026-01-02" }
But, the best responses I ever get are only:
 
"Entity does not support modifying data"
"'PATCH' requests for 'generalLedgerSetup' of EdmType 'Collection' are not allowed within Dynamics 365 Business Central OData web services"
 
Can anyone say, definitively, if it is possible to do this with out-of-the-box config without creating AL code, extending the API etc. - and, please, if so, how?
I have the same question (0)
  • Suggested answer
    Gregory Mavrogeorgis Profile Picture
    1,152 Super User 2026 Season 1 on at
    Hi,

    Short answer is no, this cannot be done out of the box.

    The standard  general ledger Setup  API in BC is read-only by design. The error "Entity does not support modifying data" is exactly that, Microsoft has not exposed PATCH on the General Ledger Setup. It is a singleton setup table and the standard API page does not allow write, even if Page 118 is exposed as a web service with Allow Write turned on, OData still treats it as a collection and blocks PATCH.

    So the two options are:

    Either expose Page 118 through a custom API page in AL, with the right entity name and a key, and PATCH against that.  To enable the PATCH method, the custom API page must use SystemId as the ODataKeyFields. This gives the OData endpoint the unique identifier it needs to update the record.

    Or use an Automation Flow / a simple codeunit exposed as a bound action, but that also needs AL.

    There is no Postman-only, configuration-only way to update General Ledger Setup. The "Allow Write" trick on the SOAP/OData page service does not bypass the singleton restriction on this particular page.

     
    ✅ Tick the checkbox below to mark the answer as verified, if it helped resolve your question.
     
    Regards
    Gregory Mavrogeorgis
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,957 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 956 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 645 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans