My Products
Help
Quan Pham
PARTNER

Error creating journal transaction

by Quan Pham

Hi,

 

I'm getting this error when trying to create a journal transaction.

 

01-2025 is closed, but we're trying to create it in period 02-2025 with a transaction date of 2025-01-07. It is possible in the UI but not via the API.

 

{  "message": "VismaId: 5e12fdec-614e-4a20-9044-cf93b204a928. Error creating journal transaction. Error: An error in processing of field Post period value 01-2025 General ledger error: The financial period '01-2025' is closed."
}

 

This is the json:

{
"ledger": {
"Value": "1"
},
"description": {
"Value": "avseende registrerade tider"
},
"transactionCode": {
"Value": "GLNE"
},
"journalTransactionLines": [{
"accountNumber": {
"Value": "9001"
},
"transactionDescription": {
"Value": "Datum: 2025-01-07"
},
"quantity": {
"Value": -8.5
},
"debitAmountInCurrency": {
"Value": -3910.0
},
"subaccount": [{
"segmentId": 1,
"segmentValue": "120230001"
}, {
"segmentId": 2,
"segmentValue": "00"
}, {
"segmentId": 3,
"segmentValue": "4300"
}
],
"creditAmountInCurrency": {
"Value": 0.0
},
"lineNumber": {
"Value": 0
},
"operation": "Insert"
}, {
"accountNumber": {
"Value": "9009"
},
"transactionDescription": {
"Value": "Datum: 2025-01-07"
},
"quantity": {
"Value": -8.5
},
"creditAmountInCurrency": {
"Value": -3910.0
},
"subaccount": [{
"segmentId": 1,
"segmentValue": "110120001"
}, {
"segmentId": 2,
"segmentValue": "00"
}, {
"segmentId": 3,
"segmentValue": "0000"
}
],
"debitAmountInCurrency": {
"Value": 0.0
},
"lineNumber": {
"Value": 0
},
"operation": "Insert"
}, {
"accountNumber": {
"Value": "9001"
},
"transactionDescription": {
"Value": "Datum: 2025-01-07"
},
"quantity": {
"Value": -8.5
},
"debitAmountInCurrency": {
"Value": -3910.0
},
"subaccount": [{
"segmentId": 1,
"segmentValue": "120230001"
}, {
"segmentId": 2,
"segmentValue": "00"
}, {
"segmentId": 3,
"segmentValue": "4300"
}
],
"creditAmountInCurrency": {
"Value": 0.0
},
"lineNumber": {
"Value": 0
},
"operation": "Insert"
}, {
"accountNumber": {
"Value": "9009"
},
"transactionDescription": {
"Value": "Datum: 2025-01-07"
},
"quantity": {
"Value": -8.5
},
"creditAmountInCurrency": {
"Value": -3910.0
},
"subaccount": [{
"segmentId": 1,
"segmentValue": "110120001"
}, {
"segmentId": 2,
"segmentValue": "00"
}, {
"segmentId": 3,
"segmentValue": "0000"
}
],
"debitAmountInCurrency": {
"Value": 0.0
},
"lineNumber": {
"Value": 0
},
"operation": "Insert"
}
],
"transactionDate": {
"Value": "2025-01-07T03:00:00.000Z"
},
"financialPeriod": {
"Value": "202502"
},
"postPeriod": {
"Value": "022025"
},
"controlTotalInCurrency": {
"Value": 0.0
},
"exchangeRate": {
"Value": 0.0
}
}

 

2 REPLIES 2
Rozhat
VISMA

by Rozhat

Hi! 🙂 

 

Can you check if posting to closed periods is enabled. 

Navigate to General ledger preferences (GL102000) → Enable "Allow posting to closed periods"

 

Then add Add overrideNumberSeries=true to your API request

"overrideNumberSeries": true,
...

 

Quan Pham
PARTNER

by Quan Pham

Hi,

 

It is disabled because we don't want to post to closed periods. Is it possible to post to an open period but with a transaction date from a closed one?

 

I tried to use overrideNumberSeries=true but I receive the same error message.