WRITEBACKJOURNAL function

Created by Harry Lewis, Modified on Mon, 3 Mar at 10:10 AM by Grigorii Kosianenko

Applies to

  • Velixo NX 2025.02 or higher

  • Acumatica: GL Module


TABLE OF CONTENTS


Introduction

If you want to write a GL batch to your ERP, you can use the WRITEBACKJOURNAL function.

You need to write a separate writeback function for each journal entry in the GL batch.
When you select the scope of the Perform Writeback action on the ribbon, all writeback functions in this scope (Current Sheet or Selected Cells) will be grouped in GL batches and written to the ERP.

Syntax

=WRITEBACKJOURNAL(Connection,TransactionDate,Period,Description,Branch,Ledger,Currency,AutoReversing,LastBatchNbr,OpenAfterImport,AutoRelease,CreateTaxLines,SkipTaxValidation,AdditionalBatchSettings,Branch,Account,Subaccount,Project,ProjectTask,CostCode,Quantity,RefNumber,UoM,Debit,Credit,TaxID,TaxCategory,TransactionDescription,NonBillable,CustomFields)

Parameters

The parameters of the WRITEBACKJOURNAL function can be divided into two groups: 

  1. The parameters of the GL batch header

  2. The parameters of the journal entry (GL batch line).

The parameters of the GL batch header should be the same for all journal entries you will add to the batch.


Parameter

Required/Optional

Description

Connection

Required

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

TransactionDate

Required

The date when the GL batch was created.

You can enter only a date corresponding to a financial period generated on the Master Financial Calendar (GL201000) form.

Period

Required

The financial period to which the journal entries should be posted. All journal entries from a GL batch are posted to the same financial period.

Description

Required

A description of the GL batch.

Branch

Required

The branch to which this GL batch is related. 

It may differ from the branches in the journal entries.

Ledger

Required

The identifier of the ledger to which the journal entries are posted.

Currency

Required

The currency used for all the journal entries in the selected GL batch.

AutoReversing

Required

If selected, the general ledger automatically creates a batch that reverses the original debit and credit transactions in the next financial period.

A reversed batch will be created when the original batch is released or posted, depending on the Generate Reversing Entries option selected on the General Ledger Preferences (GL102000) form.

LastBatchNbr

Required

The sequential batch number. 

If the batch with the LastBatchNbr number already exists, Velixo proposes creating a new one with the following sequential number.

OpenAfterImport

Required

When the entire batch is processed, open it in Acumatica.

AutoRelease

Required

Automatically release the new GL batch.

CreateTaxLines

Required

If TRUE, a tax-related transaction can be created manually for this batch.

SkipTaxValidation

Required

If TRUE, the system skips automatic validation of a tax-related transaction that you create manually.

AdditionalBatchSettings

Reserved

The field is reserved for further usage.


The parameters of the journal entries


Parameter

Required/Optional

Description

Branch

Required

The branch associated with this journal entry. It may differ from the GL batch branch.

Account

Required

The account whose balance is updated by the journal entry.

Subaccount

Required

The subaccount used with the account to detail the journal entry.

Project

Optional

The project or contract with which this journal entry is associated.

ProjectTask

Optional

The particular task of the project with which this batch is associated.

CostCode

Optional

The cost code with which this batch is associated to track project costs and revenue.

Quantity

Optional

The quantity of items associated with the transaction, if relevant.

RefNumber

Optional

The reference number of the external or internal document associated with the journal transaction.

The documents’ reference numbers must be specified for tax-related transactions. These numbers are required because tax and taxable amounts are reflected in the tax reports only if the transactions are linked to the corresponding documents.

UoM

Optional

The unit of measure for items associated with the transaction, if relevant.

Debit

Optional

The debit amount of the journal entry. 

You should specify either Debit or Credit.

Credit

Optional

The credit amount of the journal entry. 

You should specify either Debit or Credit.

TaxID

Optional

The tax used to calculate the tax amount.

It can be specified only if CreateTaxLines is TRUE.

TaxCategory

Optional

The tax category based on which the taxable amount is calculated.

It can be specified only if CreateTaxLines is TRUE.

TransactionDescription

Optional

A description of the transaction or any comments relevant to the transaction.

NonBillable

Optional

If TRUE, then this transaction is non-billable in the project

CustomFields

Optional

The two-dimensional array of custom field names and their values.

See examples and detailed explanation below.


Output

The function returns its status, which can be one of the following:

  • Pending - the formula is pending to be processed.

  • Line Uploaded - the formula was processed successfully.

  • Error - an error occurred during the processing of the formula.


Custom fields

If you want to fill the custom fields with static values, you can use inline array definition ({"Column1","Value1";"Column2","Value2"})



This approach is straightforward but does not allow using references to cells.
If you need to reference a single cell (for instance, want to write a GL batch-scoped field), the easiest way could be the following: HSTACK("BatchScopedCustomField", $G$4)


If you want to write several journal entry-scoped custom fields, you need to specify their names in the first column of the array and the values in the second column.


You can do it by transposing the Excel arrays: TRANSPOSE(COLLATE(Q9:R9,Q12:R12))



Eventually, If you want to mix batch-scoped and journal entry-scoped custom fields HSTACK(VSTACK($M$4,$M$5,$Q$9,$R$9), VSTACK($N$4,$N$5,Q10,R10)) where the first two arguments of the first VSTACK function contain GL batch-scoped custom field names, and the rest are journal entry-scoped custom field names. The arguments of the second VSTACK function contain corresponding values.


Example

If you have prepared the following workbook to write GL batches to your ERP



Then, you need to add a column to your table and fill it with the following function:

=WRITEBACKJOURNAL($B$4,$B$5,$B$6,$B$7,$E$4,$E$5,$E$6,$E$7,$H$4,$H$5,$H$6,$K$4,$K$5,[@Branch],[@Account],[@Subaccount],[@Project],[@[Project task]],[@[Cost code]],[@Quantity],[@[Ref. number]],[@[External UoM]],[@Debit],[@Credit],[@[Tax ID]],[@[Tax category]],[@[Transaction description]],[@[Non billable]])

You may notice that the Excel table columns are referred to by their names.


The result should look as the following:


Now you can fill in your data and Perform Writeback to see it in the ERP.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article