Announcements
We use the API (v2) to export journal lines to Business Central.
When we post an entry we don't have all the features like when we enter manualy a line, especially concerning taxes.
We only have a field "taxCode". But the system ignores what is set in this field and when we edit the journal on Business Central, it seems settings are still the default for the account.
Does someone has any idea how to correct this behaviour ?
Have a nice day
Steve
Hello,
You can of course raise a feature suggestion via https://aka.ms/bcideas . We are open for suggestion. Also you can verify what is exposed out of the box and what has not been exposed yet via:
api.businesscentral.dynamics.com/.../$metadata
Hope at least this helps.
thanks for the answer...
I am little bit disappointed that the standard API doesn't allow to post standard bookkeeping entries :(
Hello,
Thank you for the message. Now I see what you mean. The field taxCode is linked to VAT Prod. Posting Group. You want to populate data in field VAT Bus. Posting Group. I assume that these have been been populated in the API, so you need to create a custom API for t his where you expose these yourself.
Hope it helps.
I use BC online, I don't know where to find the version ? I tried to find "version" in the search menu, without success.
Thanks for the suggestion, unfortunately, how to specify "VAT Bus. Posting Group", if we can only set "taxCode", which I guess is "VAT Prod. Posting Group". Here is the table of my customer (VAT posting setup) :
if I post "NORMAL" in the taxcode, how or where to post "NATIONAL" or "EXPORT" ?
Hello,
At my side it works fine:
api.businesscentral.dynamics.com/.../{{TENANTAADID}}/{{PRODUCTION}}/api/v2.0/companies({{COMPANY}})/journals({{JournalID}})/journalLines
POST {{baseUrl}}companies({{companyId}})/journals({{journalId}})/journalLines { "accountNumber": "3203", "postingDate": "2022-10-12", "documentNumber": "1234", "amount": 1300, "description": "test", "comment" : "test comment", "taxCode" : "NORMAL" }
this works to post a new line in a journal. But in the documentation it seems there is no way to fill these fields in
in the documentation, these fields don't seem to appear :
journalLine resource type - Business Central | Microsoft Learn
Seems that these fields are set directly from the config of each account.
Hello,
Best probably is to post your JSON so anyone can take a look.
Thank you.
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator