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 import and exports.
BCCL can create stub records in related table 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 specify 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 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 string (normal csv behavior) is 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 have 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 screen what goes on.
Everything is UTF8
BCCL output everything as UTF8 and expects all input files to be UTF8.
What about OAuth authentication?
The first version of BCCL will only allow basic authentication. Internally OAuth is already supported but the login process of providing the access token is not baken into the client yet.
OAuth will of course of the fully supported before Microsoft turns of Basic Authentication (Scheduled for Version 18).