Overview
The BC.WRITEBACKJOURNAL function enables you to write lines to a specified General Journal in Business Central.
Writing back to General Journals is not available to users with the MS Dynamics 365 Team Members license.
Related articles
-
Getting started with Writeback - A general article on setting up and using writeback functions.
Syntax
=BC.WRITEBACKJOURNAL(
ConnectionName,
PostingDate,
Journal,
PostTransaction,
GlRegisterNumberOutput,
OpenAfterImport,
AccountType,
Account,
Amount,
DocumentNumber,
ExternalDocumentNumber,
BalancingAccountType,
BalancingAccount,
Description,
Comment,
Dimensions,
LineNumber
)
Arguments
Header data
|
Argument |
Required/Optional |
Description |
|
|
Required |
The name of the connection, as specified in the Connection Manager. This function does not support the multiple connection functionality. |
|
|
Required |
The date of the transaction in the general ledger. |
|
|
Required |
The name of the General Journal. |
|
|
Required |
Determines whether the transactions in the specified General journal should be posted.
Affects all lines in the specified General Journal, not just the lines uploaded during writeback. |
|
|
Optional |
Defines the address of the cell where the GL register number is returned after writeback is complete. Use only when |
|
|
Optional |
Possible values:
Default value: |
Line data
|
Argument |
Required/Optional |
Description |
|
|
Required |
The type of the account to which the entry line will be posted.
|
|
|
Required |
The number of the account to which the entry line will be posted. |
|
|
Required |
The total amount (including VAT) in the journal line. |
|
|
Required |
A document number for the journal line. |
|
|
Optional |
An external document number for the journal line. |
|
|
Optional |
The type of balancing account.
|
|
|
Optional |
The balancing G/L Account or object ID. |
|
|
Optional |
A description of the journal line. |
|
|
Optional |
A comment on the journal line. |
|
|
Optional |
A two-column Excel range, where the first column contains the name of a predefined dimension (e.g. department, customer, project etc.), and the second column contains the value for that dimension. See the Using Dimensions article for more details. |
|
|
Optional |
The journal item line number. |
Examples
Writeback to particular dimensions
Assume the following dimension range A3:B4:
You can reference this range in your BC.WRITEBACKJOURNAL formula:
=BC.WRITEBACKJOURNAL(
"BC",
"2025-01-15",
"GENERAL",
FALSE,
,
,
"G/L Account",
"61100",
1500,
"INV-001",
,
,
,
"Office supplies",
,
E3:F4
)
This formula writes a journal line for account 61100 with a debit of 1500, balanced against account 10100, and assigns the dimension value codes DEPARTMENT – SALES and AREA – 10 to the journal line.
You can also use an inline array instead of a cell range:
=BC.WRITEBACKJOURNAL(
"BC",
"2025-01-15",
"GENERAL",
FALSE,
,
,
"G/L Account",
"61100",
1500,
"INV-001",
,
,
,
"Office supplies",
,
{"DEPARTMENT","SALES";"AREA","40"}
)