Create Processing Journal |
Scroll |
Endpoint: https://api.businesscentral.dynamics.com/v2.0/<environment name>/api/therefore/connector/v1.0/companies(<company id>)/processingjournals
Body Mapping:
JSON Name |
JSON Value |
TableID |
122 |
DocumentNo |
IndexData.GetField(“Invoice_No”) |
NAVDocumentID |
parseInt(IndexData.GetField("InvoiceID") |
CategoryID |
<Therefore™ CategoryNo for this WF> |
Status |
“delayed update of indexdata” |
BC Table 122 Purchase Invoice Header
The CategoryID has to match the category of the WF.
The Status has to be set to exactly “delayed update of indexdata” (with quotes) as a command that index data should be updated.
The “parseInt” function is defined as common script:
For sandbox testing, the URLs have to be adjusted like that:
https://api.businesscentral.dynamics.com/v2.0/<environment name>/sandbox/api/v2.0/companies(<company id>)/…
To find out your “environment name”, click on “? -> Help & Support”
The scroll down to “Troubleshooting” to find your Azure AD Tenant ID
To find out the company ID, you can call the following API function:
https://api.businesscentral.dynamics.com/v2.0/<environment name>/sandbox/api/v2.0/companies
It is a GET call without a body and requires the same authorization as the other API calls.
All Call REST WF tasks expect “200;201” as success code.
All Call REST WF tasks are using Basic Authorization with user name and the “Web Service Access Key” as password. The access key can be found on the users card:
The username is just the same name as sown on the user card. (e.g. “DEMO” on the screenshot)