My Products
Help
ErikW
PARTNER

JournalTransaction V2 problem with new company

by ErikW

I get the following error message when trying to post JournalTransactions to a newly created company in Visma.Net: "Error creating journal transaction. Cannot insert the value NULL into column 'LedgerID', table '****.dbo.GLTran'; column does not allow nulls. INSERT fails." . The same integration code is serving 4 other company instances and my ERP/Visma.Net colleagues insist that the problematic newly created company instance is configured in the same way as the others. Apparently this is a problem we have encountered before that just magically resolved itself within a day or so... Any suggestions or ideas? I have tried explicitly stating a ledger by using the ledger field in the DTO but with the same result. 

3 REPLIES 3

by Magnus Johnsen

Hi,

When was the company created?
If you try to enter a transaction in the UI, are you having any issues there as well?

Could you please send us the JSON?

ErikW
PARTNER

by ErikW

Hi,

The company was created a few hours before the issue was realized. It has magically resolved itself over the weekend. After conferring with additional colleagues, this issue seems to occur when creating a new company and trying to create a journal transaction within an unspecified, but narrow, timeframe after creation. There were no issues when using the UI. If i were to hazard a guess, I'd say that some resources/services connected to API functionality (such as database triggers perhaps?) have a bit of delay before they are properly configured and allocated for a new company. Is this a known behavior? And if so is it documented somewhere?

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

There are occasionally some issue related to the cache not being updated, however there is no documentation regarding this and it is not always a problem.