
Hi All
I'm following the example below to insert taxPercent and totalTaxAmount but these fields are set as read-only. Bit confused as this is the official example of the POST request:
Create salesInvoiceLines - Business Central | Microsoft Docs
POST https://{businesscentralPrefix}/api/v2.0/companies({id})/salesInvoices({id})/salesInvoiceLines
Content-type: application/json
{
"id": "238cb9c0-44e3-ea11-bb43-000d3a2feca1",
"documentId": "9e0f5c9c-44e3-ea11-bb43-000d3a2feca1",
"sequence": 10000,
"itemId": "02a6738a-44e3-ea11-bb43-000d3a2feca1",
"accountId": "00000000-0000-0000-0000-000000000000",
"lineType": "Item",
"lineObjectNumber": "1928-S",
"description": "AMSTERDAM Lamp",
"unitOfMeasureId": "5ca6738a-44e3-ea11-bb43-000d3a2feca1",
"unitOfMeasureCode": "PCS",
"unitPrice": 54.9,
"quantity": 3,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 164.7,
"taxCode": "FURNITURE",
"taxPercent": 5,
"totalTaxAmount": 8.24,
"amountIncludingTax": 172.94,
"invoiceDiscountAllocation": 0,
"netAmount": 164.7,
"netTaxAmount": 8.24,
"netAmountIncludingTax": 172.94,
"shipmentDate": "2020-08-21",
"itemVariantId": "00000000-0000-0000-0000-000000000000"
}
Hello - I do see we have some discussion similar on this post:
community.dynamics.com/.../updating-sales-order-lines-via-api
It looks like you would need to write your own API to update those fields.
We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
dynamicsuser.net/.../developers
I will open this up to the community in case they have something to add.