Skip to main content

Actions

The ballerinax/microsoft.dynamics365.finance.taxregion package exposes the following clients:

ClientPurpose
ClientProvides full CRUD access to Microsoft Dynamics 365 Finance Tax Region entities via the OData REST API.

Client

Provides full CRUD access to Microsoft Dynamics 365 Finance Tax Region entities via the OData REST API.

Configuration

FieldTypeDefaultDescription
authOAuth2ClientCredentialsGrantConfigRequiredOAuth2 client credentials grant configuration used to authenticate with Microsoft Entra ID (tokenUrl, clientId, clientSecret, scopes).
httpVersionhttp:HttpVersionhttp:HTTP_2_0The HTTP version understood by the client.
http1Settingshttp:ClientHttp1Settings{}Configurations related to the HTTP/1.x protocol.
secureSockethttp:ClientSecureSocket()SSL/TLS-related options.
proxyhttp:ProxyConfig()Proxy server related options.

Initializing the client

import ballerinax/microsoft.dynamics365.finance.taxregion;

configurable string tokenUrl = ?;
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string serviceUrl = ?;

taxregion:Client fo = check new (
{
auth: {
tokenUrl,
clientId,
clientSecret
}
},
serviceUrl
);

Operations

EF Doc Schemas

listEFDocSchemas

Lists Brazilian electronic fiscal document (EFDoc) schemas used for tax event submission, discard, cancellation, and correction letters.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListEFDocSchemasQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: EFDocSchemasCollection|error

Sample code:

taxregion:EFDocSchemasCollection result = check fo->listEFDocSchemas(
queries = {
filter: "SchemaType eq 'Submit'",
top: 10
}
);
createEFDocSchemas

Creates an electronic fiscal document schema.

Parameters:

NameTypeRequiredDescription
payloadEFDocSchemaYesThe EFDoc schema record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: EFDocSchema|error

Sample code:

taxregion:EFDocSchema created = check fo->createEFDocSchemas({
version: "V4",
schemaType: "Submit",
schemaFilePath: "C:\\EFDocSchemas\\nfe_v4_submit.xsd"
});
getEFDocSchemas

Retrieves a specific EFDoc schema by its schema type and version key.

Parameters:

NameTypeRequiredDescription
schemaTypestringYesThe schema type key field (e.g., "Submit", "Cancel").
versionstringYesThe version key field (e.g., "V4").
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetEFDocSchemasQueriesNoOData query parameters: expand, 'select.

Returns: EFDocSchema|error

Sample code:

taxregion:EFDocSchema schema = check fo->getEFDocSchemas("Submit", "V4");
deleteEFDocSchemas

Deletes a specific EFDoc schema.

Parameters:

NameTypeRequiredDescription
schemaTypestringYesThe schema type key field.
versionstringYesThe version key field.
headersDeleteEFDocSchemasHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getEFDocSchemas response's ETag header
check fo->deleteEFDocSchemas("Submit", "V4", {ifMatch: eTag});
updateEFDocSchemas

Updates a specific EFDoc schema.

Parameters:

NameTypeRequiredDescription
schemaTypestringYesThe schema type key field.
versionstringYesThe version key field.
payloadEFDocSchemaYesThe fields to update.
headersUpdateEFDocSchemasHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: EFDocSchema|error

Sample code:

// eTag obtained from a prior getEFDocSchemas response's ETag header
taxregion:EFDocSchema updated = check fo->updateEFDocSchemas(
"Submit",
"V4",
{schemaFilePath: "C:\\EFDocSchemas\\nfe_v4_submit_rev2.xsd"},
{ifMatch: eTag}
);

ISR Concepts

listISRConcepts

Lists Mexican ISR (Impuesto Sobre la Renta) withholding concepts.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListISRConceptsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: ISRConceptsCollection|error

Sample code:

taxregion:ISRConceptsCollection result = check fo->listISRConcepts(
queries = {
filter: "dataAreaId eq 'MFG1'",
top: 20
}
);
createISRConcepts

Creates an ISR withholding concept.

Parameters:

NameTypeRequiredDescription
payloadISRConceptYesThe ISR concept record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: ISRConcept|error

Sample code:

taxregion:ISRConcept created = check fo->createISRConcepts({
dataAreaId: "MFG1",
description: "Revenue concept for ISR withholding",
debitCreditIndicator: "Credit",
chartOfAccountsName: "MFG1_COA",
conceptId: "Revenue",
mainAccountId: "401000"
});
getISRConcepts

Retrieves a specific ISR concept by its data area, concept, main account, and chart of accounts key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
conceptIdstringYesThe concept id key field (e.g., "Revenue", "Deductions").
mainAccountIdstringYesThe main account id key field.
chartOfAccountsNamestringYesThe chart of accounts name key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetISRConceptsQueriesNoOData query parameters: expand, 'select.

Returns: ISRConcept|error

Sample code:

taxregion:ISRConcept concept = check fo->getISRConcepts("MFG1", "Revenue", "401000", "MFG1_COA");
deleteISRConcepts

Deletes a specific ISR concept.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
conceptIdstringYesThe concept id key field.
mainAccountIdstringYesThe main account id key field.
chartOfAccountsNamestringYesThe chart of accounts name key field.
headersDeleteISRConceptsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getISRConcepts response's ETag header
check fo->deleteISRConcepts("MFG1", "Revenue", "401000", "MFG1_COA", {ifMatch: eTag});
updateISRConcepts

Updates a specific ISR concept.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
conceptIdstringYesThe concept id key field.
mainAccountIdstringYesThe main account id key field.
chartOfAccountsNamestringYesThe chart of accounts name key field.
payloadISRConceptYesThe fields to update.
headersUpdateISRConceptsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: ISRConcept|error

Sample code:

// eTag obtained from a prior getISRConcepts response's ETag header
taxregion:ISRConcept updated = check fo->updateISRConcepts(
"MFG1",
"Revenue",
"401000",
"MFG1_COA",
{description: "Updated revenue concept for ISR withholding"},
{ifMatch: eTag}
);

ISR Rates

listISRRates

Lists Mexican ISR withholding rates by year, month, and maximum amount bracket.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListISRRatesQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: ISRRatesCollection|error

Sample code:

taxregion:ISRRatesCollection result = check fo->listISRRates(
queries = {
filter: "year eq 2026",
orderby: "month asc"
}
);
createISRRates

Creates an ISR withholding rate bracket for a given year and month.

Parameters:

NameTypeRequiredDescription
payloadISRRateYesThe ISR rate record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: ISRRate|error

Sample code:

taxregion:ISRRate created = check fo->createISRRates({
dataAreaId: "MFG1",
year: 2026,
month: 1,
rate: 10.5d,
maximumAmount: 5000.00d,
fixedAmount: 25.00d
});
getISRRates

Retrieves a specific ISR rate by its data area, year, month, and maximum amount key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
yearintYesThe year key field.
monthintYesThe month key field.
maximumAmountdecimalYesThe maximum amount key field for the rate bracket.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetISRRatesQueriesNoOData query parameters: expand, 'select.

Returns: ISRRate|error

Sample code:

taxregion:ISRRate rate = check fo->getISRRates("MFG1", 2026, 1, 5000.00d);
deleteISRRates

Deletes a specific ISR rate bracket.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
yearintYesThe year key field.
monthintYesThe month key field.
maximumAmountdecimalYesThe maximum amount key field.
headersDeleteISRRatesHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getISRRates response's ETag header
check fo->deleteISRRates("MFG1", 2026, 1, 5000.00d, {ifMatch: eTag});
updateISRRates

Updates a specific ISR rate bracket.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
yearintYesThe year key field.
monthintYesThe month key field.
maximumAmountdecimalYesThe maximum amount key field.
payloadISRRateYesThe fields to update.
headersUpdateISRRatesHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: ISRRate|error

Sample code:

// eTag obtained from a prior getISRRates response's ETag header
taxregion:ISRRate updated = check fo->updateISRRates(
"MFG1",
2026,
1,
5000.00d,
{rate: 11.0d},
{ifMatch: eTag}
);

Intervats

listIntervats

Lists Belgian Intervat VAT listing declarations.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListIntervatsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: IntervatsCollection|error

Sample code:

taxregion:IntervatsCollection result = check fo->listIntervats(
queries = {
filter: "status eq 'Created'",
top: 10
}
);
createIntervats

Creates an Intervat VAT listing declaration.

Parameters:

NameTypeRequiredDescription
payloadIntervatYesThe Intervat declaration record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: Intervat|error

Sample code:

taxregion:Intervat created = check fo->createIntervats({
dataAreaId: "BEL1",
intervatId: "INT-2026-Q1",
companyName: "Contoso Belgium NV",
enterpriseNumber: "0123456789",
period: "2026Q1",
periodFrequency: "Quarterly",
validFrom: "2026-01-01",
validTo: "2026-03-31",
amount: 15230.50d,
salesTaxNumber: "BE0123456789",
status: "Created"
});
getIntervats

Retrieves a specific Intervat declaration by its data area, intervat id, valid-from, and valid-to key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
intervatIdstringYesThe intervat id key field.
validFromstringYesThe valid from key field.
validTostringYesThe valid to key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetIntervatsQueriesNoOData query parameters: expand, 'select.

Returns: Intervat|error

Sample code:

taxregion:Intervat declaration = check fo->getIntervats("BEL1", "INT-2026-Q1", "2026-01-01", "2026-03-31");
deleteIntervats

Deletes a specific Intervat declaration.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
intervatIdstringYesThe intervat id key field.
validFromstringYesThe valid from key field.
validTostringYesThe valid to key field.
headersDeleteIntervatsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getIntervats response's ETag header
check fo->deleteIntervats("BEL1", "INT-2026-Q1", "2026-01-01", "2026-03-31", {ifMatch: eTag});
updateIntervats

Updates a specific Intervat declaration.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
intervatIdstringYesThe intervat id key field.
validFromstringYesThe valid from key field.
validTostringYesThe valid to key field.
payloadIntervatYesThe fields to update.
headersUpdateIntervatsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: Intervat|error

Sample code:

// eTag obtained from a prior getIntervats response's ETag header
taxregion:Intervat updated = check fo->updateIntervats(
"BEL1",
"INT-2026-Q1",
"2026-01-01",
"2026-03-31",
{status: "Sent", preparationDate: "2026-04-05"},
{ifMatch: eTag}
);

NIP Tables

listNIPTables

Lists Polish NIP (tax identification number) address tables used for VAT reporting.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListNIPTablesQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: NIPTablesCollection|error

Sample code:

taxregion:NIPTablesCollection result = check fo->listNIPTables(
queries = {
filter: "dataAreaId eq 'POL1'",
top: 25
}
);
createNIPTables

Creates a NIP address table entry.

Parameters:

NameTypeRequiredDescription
payloadNIPTableYesThe NIP table record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: NIPTable|error

Sample code:

taxregion:NIPTable created = check fo->createNIPTables({
dataAreaId: "POL1",
nIPNumber: "1234567890",
code: "WAW01",
addressing: "ul. Marszalkowska 1, 00-624 Warszawa",
accountName: "Contoso Polska Sp. z o.o."
});
getNIPTables

Retrieves a specific NIP table entry by its data area and code key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
codestringYesThe code key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetNIPTablesQueriesNoOData query parameters: expand, 'select.

Returns: NIPTable|error

Sample code:

taxregion:NIPTable entry = check fo->getNIPTables("POL1", "WAW01");
deleteNIPTables

Deletes a specific NIP table entry.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
codestringYesThe code key field.
headersDeleteNIPTablesHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getNIPTables response's ETag header
check fo->deleteNIPTables("POL1", "WAW01", {ifMatch: eTag});
updateNIPTables

Updates a specific NIP table entry.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
codestringYesThe code key field.
payloadNIPTableYesThe fields to update.
headersUpdateNIPTablesHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: NIPTable|error

Sample code:

// eTag obtained from a prior getNIPTables response's ETag header
taxregion:NIPTable updated = check fo->updateNIPTables(
"POL1",
"WAW01",
{addressing: "ul. Marszalkowska 10, 00-624 Warszawa"},
{ifMatch: eTag}
);

NR Tax Transactions

listNRTaxTrans

Lists Latvian natural resource tax transactions on packing materials and dangerous goods.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListNRTaxTransQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: NRTaxTransCollection|error

Sample code:

taxregion:NRTaxTransCollection result = check fo->listNRTaxTrans(
queries = {
filter: "transType eq 'TaxOnPackingMaterials'",
top: 15
}
);
createNRTaxTrans

Creates a natural resource tax transaction line.

Parameters:

NameTypeRequiredDescription
payloadNRTaxTransYesThe natural resource tax transaction record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: NRTaxTrans|error

Sample code:

taxregion:NRTaxTrans created = check fo->createNRTaxTrans({
dataAreaId: "LVA1",
lineId: "LINE-0001",
invoice: "INV-000456",
itemNumber: "PKG-CARDBOARD-01",
transType: "TaxOnPackingMaterials",
packingMaterialCode: "CARDBOARD",
packingQty: 500,
packingUnit: "kg",
taxBaseAmount: 250.00d,
taxCode: "NRT-LV",
taxAmount: 12.50d
});
getNRTaxTrans

Retrieves a specific natural resource tax transaction by its data area and line id key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
lineIdstringYesThe line id key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetNRTaxTransQueriesNoOData query parameters: expand, 'select.

Returns: NRTaxTrans|error

Sample code:

taxregion:NRTaxTrans txn = check fo->getNRTaxTrans("LVA1", "LINE-0001");
deleteNRTaxTrans

Deletes a specific natural resource tax transaction.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
lineIdstringYesThe line id key field.
headersDeleteNRTaxTransHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getNRTaxTrans response's ETag header
check fo->deleteNRTaxTrans("LVA1", "LINE-0001", {ifMatch: eTag});
updateNRTaxTrans

Updates a specific natural resource tax transaction.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
lineIdstringYesThe line id key field.
payloadNRTaxTransYesThe fields to update.
headersUpdateNRTaxTransHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: NRTaxTrans|error

Sample code:

// eTag obtained from a prior getNRTaxTrans response's ETag header
taxregion:NRTaxTrans updated = check fo->updateNRTaxTrans(
"LVA1",
"LINE-0001",
{taxAmount: 13.75d},
{ifMatch: eTag}
);

Tax 1099 Fields

listTax1099Fields

Lists US 1099 statutory reporting fields and box numbers used for vendor tax reporting.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListTax1099FieldsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: Tax1099FieldsCollection|error

Sample code:

taxregion:Tax1099FieldsCollection result = check fo->listTax1099Fields(
queries = {
filter: "typeOfTax1099Form eq 'F1099NEC'",
top: 10
}
);
createTax1099Fields

Creates a 1099 reporting field.

Parameters:

NameTypeRequiredDescription
payloadTax1099FieldYesThe 1099 field record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: Tax1099Field|error

Sample code:

taxregion:Tax1099Field created = check fo->createTax1099Fields({
dataAreaId: "USMF",
typeOfTax1099Form: "F1099NEC",
tax1099Box: "1",
form: "1099-NEC",
description: "Nonemployee compensation",
boxNumber: 1,
minimumAmount: 600.00d
});
getTax1099Fields

Retrieves a specific 1099 field by its data area, form type, and box key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
typeOfTax1099FormstringYesThe type of tax1099 form key field (e.g., "F1099NEC").
tax1099BoxstringYesThe tax1099 box key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetTax1099FieldsQueriesNoOData query parameters: expand, 'select.

Returns: Tax1099Field|error

Sample code:

taxregion:Tax1099Field field = check fo->getTax1099Fields("USMF", "F1099NEC", "1");
deleteTax1099Fields

Deletes a specific 1099 field.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
typeOfTax1099FormstringYesThe type of tax1099 form key field.
tax1099BoxstringYesThe tax1099 box key field.
headersDeleteTax1099FieldsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getTax1099Fields response's ETag header
check fo->deleteTax1099Fields("USMF", "F1099NEC", "1", {ifMatch: eTag});
updateTax1099Fields

Updates a specific 1099 field.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
typeOfTax1099FormstringYesThe type of tax1099 form key field.
tax1099BoxstringYesThe tax1099 box key field.
payloadTax1099FieldYesThe fields to update.
headersUpdateTax1099FieldsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: Tax1099Field|error

Sample code:

// eTag obtained from a prior getTax1099Fields response's ETag header
taxregion:Tax1099Field updated = check fo->updateTax1099Fields(
"USMF",
"F1099NEC",
"1",
{minimumAmount: 650.00d},
{ifMatch: eTag}
);

Tax Documents

listTaxDocuments

Lists tax documents and their associated credit memo amounts for customer and vendor transactions.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesListTaxDocumentsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany (cross-company), count, 'select.

Returns: TaxDocumentsCollection|error

Sample code:

taxregion:TaxDocumentsCollection result = check fo->listTaxDocuments(
queries = {
filter: "dataAreaId eq 'USMF'",
top: 20
}
);
createTaxDocuments

Creates a tax document.

Parameters:

NameTypeRequiredDescription
payloadTaxDocumentYesThe tax document record to create.
headersmap<string|string[]>NoAdditional HTTP request headers.

Returns: TaxDocument|error

Sample code:

taxregion:TaxDocument created = check fo->createTaxDocuments({
dataAreaId: "USMF",
taxDocumentNumber: "TAXDOC-000789",
custVendTransTableId: 100456,
taxDocumentDate: "2026-08-05",
taxDocumentTransactionTypeOfTax: "VAT",
amount: 1250.00d,
taxAmount: 187.50d,
amountInTransactionCurrency: 1250.00d,
taxAmountInCurrency: 187.50d
});
getTaxDocuments

Retrieves a specific tax document by its data area, tax document number, and customer/vendor transaction table id key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
taxDocumentNumberstringYesThe tax document number key field.
custVendTransTableIdintYesThe cust vend trans table id key field.
headersmap<string|string[]>NoAdditional HTTP request headers.
queriesGetTaxDocumentsQueriesNoOData query parameters: expand, 'select.

Returns: TaxDocument|error

Sample code:

taxregion:TaxDocument document = check fo->getTaxDocuments("USMF", "TAXDOC-000789", 100456);
deleteTaxDocuments

Deletes a specific tax document.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
taxDocumentNumberstringYesThe tax document number key field.
custVendTransTableIdintYesThe cust vend trans table id key field.
headersDeleteTaxDocumentsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: error?

Sample code:

// eTag obtained from a prior getTaxDocuments response's ETag header
check fo->deleteTaxDocuments("USMF", "TAXDOC-000789", 100456, {ifMatch: eTag});
updateTaxDocuments

Updates a specific tax document.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
taxDocumentNumberstringYesThe tax document number key field.
custVendTransTableIdintYesThe cust vend trans table id key field.
payloadTaxDocumentYesThe fields to update.
headersUpdateTaxDocumentsHeadersNoRequest headers, including an optional ifMatch ETag for optimistic concurrency.

Returns: TaxDocument|error

Sample code:

// eTag obtained from a prior getTaxDocuments response's ETag header
taxregion:TaxDocument updated = check fo->updateTaxDocuments(
"USMF",
"TAXDOC-000789",
100456,
{taxAmount: 190.00d, taxAmountInCurrency: 190.00d},
{ifMatch: eTag}
);