Business Central Command Line
These are some of the more advanced features of BCCL, usually not necessary for normal use.
BCCL can turn dimension sets into columns, both for imports and exports.
BCCL can create stub records in related tables to make importing data easier.
Data creation pattern (DelayedInsert)
You can use the -d true, DelayedInsert to specify what pattern BCCL is using for adding data:
|-d false (default)||All fields are filled out (and validated if mapping file specifies validation) then the record is inserted.|
|-d true||Primary key values are filled out. The record is inserted. Then the rest of the fields are filled out, and the record is modified.|
BCCL can handle binary fields like Media and Blob. This is done with base64 encoded fields.
Specify the -b true to activate the usage of binary fields.
Add header to CSV files
Use the -h false parameter to omit the creation of a CSV header. Importing CSV files requires a header.
Specify CSV Delimiter
You can change the default delimiter (comma) with the -l parameter.
There are some special characters that can be used, where perhaps the most common is \t (Tabulator).
- \\ – Backslash
\a– Alert (character 7)
\b– Backspace (character 8)
\f– Form feed (character 12)
\n– New line (character 10)
\r– Carriage return (character 13)
\t– Horizontal tab (character 9)
\v– Vertical tab (character 11)
- \0 – Null (character 0)
If you use \t, the quotes around strings (normal csv behaviour) are omitted since TSV files are normally without quotes.
To use the pipe |, you must add quotes around (-t “|”) it since the pipe is a commando-line function also.
Specify paging and paging size
Business Central has a maximum size of data you can send or receive at once. If BCCL needs to transfer more data, then paging (using multiple calls) to upload or download. You can specify the page size with the -z 1000000 (value in bytes).
Be aware that if uploading paging is needed, each page will be individually committed to the database.
Get more information
Use the -v (verbose) to have BCCL show on the screen what goes on.
Everything is UTF8
BCCL outputs everything as UTF8 and expects all input files to be UTF8.
What about OAuth authentication?
OAuth is fully supported. Either use impersonation of existing users or use Service to Service OAuth authentication using Azure AD Application Registrations.