My Products
Help
Gabriella Hennings
CHAMPION *

SQL error when creating journal transactions

by Gabriella Hennings

HI 

 

I get SQL error when when we tries to create journal transactions fpr one customer.

It indicates that Ledger is null, but it's "1" in the request, and it also exists in the customer setup.

 

VismaId: ca46eb5d-d476-446f-b93e-ada343ef5f62. Error creating journal transaction. Cannot insert the value NULL into column 'LedgerID', table 'ERP_SE_DEMO_0020.dbo.GLTran'; column does not allow nulls. INSERT fails.
The statement has been terminated.

 

example json in the request: 

{
	"hold": {
		"value": true
	},
	"transactionDate": {
		"value": "2023-11-27 11:12:38"
	},
	"ledger": {
		"value": "1"
	},
	"description": {
		"value": "Bambora"
	},
	"journalTransactionLines": [
		{
			"operation": "insert",
			"accountNumber": {
				"value": "1931"
			},
			"debitAmountInCurrency": {
				"value": 137969.25
			}
		},
		{
			"operation": "insert",
			"accountNumber": {
				"value": "1580"
			},
			"creditAmountInCurrency": {
				"value": -137969.25
			}
		}
	]
}
Best regards
Gabriella Hennings
Cloud Connection AB
3 REPLIES 3
MagnusHolen
PARTNER

by MagnusHolen

Hi, we are also having this exact issue on a old integration after switching to tennant id authorization. Works fine when authenticating with the old authentication method.

Gabriella Hennings
CHAMPION *

by Gabriella Hennings

Any idéas why we encounter this problem? 

 

I can also add that I have tried the integration against another company and it works fine.

Best regards
Gabriella Hennings
Cloud Connection AB

Hi,

Is this demo company newly created?

We are not able to reproduce the issue using the same JSON, could you please try again?

Thank you.