Skip to main content
Skip table of contents

BC.WRITEBACKBUDGET

Overview

The BC.WRITEBACKBUDGET function enables you to write lines to a specified GL budget in Business Central.

Syntax

CODE
=BC.WRITEBACKBUDGET(
  ConnectionName, 
  Budget, 
  BudgetDescription, 
  BudgetDimensions,
  BudgetUpdateMode,
  Account, 
  Amount, 
  Date, 
  Description, 
  Dimensions, 
  EntryNumber,
  EntryNumberOutput
)

Arguments

Header data

Argument

Required/Optional

Description

ConnectionName

Required

The name of the connection, as specified in the Connection Manager

Budget

Required

The name of the GL budget targeted for Writeback.

If a budget with the provided name is not present in Business Central, a new budget by that name will be created.

BudgetDescription

Optional

A textual description of the budget.

BudgetDimensions

Optional

Comma-separated array of budget dimensions.

This parameter affects only newly created budgets. If skipped, the new budget is created without budget dimensions.

Global dimensions are not affected by this parameter.

BudgetUpdateMode

Optional

One of four available values:

  • by-entry-number, which requires specifying the internal ID for update in the EntryNumber line argument. If the ID is not specified, a new budget entry is created.

  • recreate – erases all entries in the budget, then creates new entries. Be careful with using WRITEBACKCOMMIT.

  • by-natural-key – (default value) "smart" mode where you can specify a set of columns (such as the date, account, dimension values) by which Velixo will decide whether to update an existing budget entry or to create a new one:

    • If one entry matching the key is found, update it.

    • If multiple entries matching the same key are found, update one of them with the new value and set the others to zero.

    • If no entry is found, create a new one with the specified value.

  • A manually provided set of key values, for example, dimensions, description. The available values are: account, date, dimensions (or dimension), description. The values account and date are added automatically if not provided.

Line data

Argument

Required/Optional

Description

Account

Required

Account code for which the budget entry is created.

Amount

Required

Budget entry amount.

Date

Required

Budget entry date.

Description

Optional

A description of the budget entry.

Dimensions

Optional

A two-column (or two-row) Excel range, where the first column/row contains the name of a predefined dimension (e.g. department, customer, project etc.), and the second column/row contains the semicolon-separated list of values for that dimension.

EntryNumber

Optional

Budget entry number.

EntryNumberOutput

Optional

Reference to a cell where the GL budget entry numbers will be returned.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.