My Products
Help
Anders Liljefors
CONTRIBUTOR *

Error creating journal after update API 8.91.0 - 05.04.2022

by Anders Liljefors

Hi,

 

Booking journals fails for all our customers that uses journal bookings after update.

 

"message":"VismaId: 9b1283b1-119c-48b3-939d-d1783bee8655.
Error creating journal transaction. Error: Avdelning, Motpart of SubCD do not exist."


We noticed in the release notes that there is:
"New handling of subaccount segments in Post JournalTransactionsV2" that allow us to omitt segments.
"The omitted segments will be assigned the default values as specified in the General ledger"

But for that matter, we should be able to continue to set them on the booking, right?
if not, it is definitely a breaking change and should be listed as such.

 

regards

 

/anders

7 REPLIES 7

by Yıldırım (Updated ‎08-04-2022 15:50 by Yıldırım VISMA )

Hello Anders, 

we were able to create the JT document with a generic JSON payload that we've tested the subaccounts in the ERP company.

We've tried overwriting the specific segments via POST when other subaccounts segments excluded from the payload to let the system set their default values, that has also been succeeded.


Settings to check:
1) General ledger preferences (ScreenId=GL102000)

General ledger preferences.jpg

 

2) If the account used is a Cash Account (ScreenId=CA202000)
Cash accounts.jpg

 

3) Segment keys - "Subaccount" (ScreenId=CS202000)  

Segment keys.jpg

If "validate" is checked, then the value of that specific "segmentID" should be registered in the "Segment Values".
This can be controlled by clicking the "segment ID" in the line to open a related "Segment Value" window. 

Segment_values.jpg

 

Please check aforementioned settings out, retry the transaction and inform us accordingly.
Thanks.

 

Anders Liljefors
CONTRIBUTOR *

Hi,
After a lot of investigation, we have come to the following conclusion.
Before the update, it was possible to book on a code part that did not contain all the characters.

Examples:
Default Code parts: 0-00-0000-00000
Works in UI: 0-00-0000-45 (works also via API, if the two char value is last in the code part)
Works in UI: 0-00-32-00000 (the value 32 does not work via API after update)

 

 

AndersLiljefors_3-1649758122247.png

 

 

This works

{
"operation": "Insert",
"lineNumber": {},
"accountNumber": {
"value": "5800"
},
"subaccount": [
{
"segmentId": "1",
"segmentValue": "1"
},
{
"segmentId": "2",
"segmentValue": "00"
},
{
"segmentId": "3",
"segmentValue": "0000"
},
{
"segmentId": "4",
"segmentValue": "45"
}
],
"debitAmountInCurrency": {
"value": 189.41
},
"vatCodeId": {
"value": "01"
}

 

This does not work:

{
"operation": "Insert",
"lineNumber": {},
"accountNumber": {
"value": "5800"
},
"subaccount": [
{
"segmentId": "1",
"segmentValue": "1"
},
{
"segmentId": "2",
"segmentValue": "00"
},
{
"segmentId": "3",
"segmentValue": "32"
},
{
"segmentId": "4",
"segmentValue": "00000"
}
],
"debitAmountInCurrency": {
"value": 189.41
},
"vatCodeId": {
"value": "01"
}

 

 

by Yıldırım (Updated ‎14-04-2022 13:28 by Yıldırım VISMA )

Hello, 

 

FYI, if the defaults are different,
the account number shown in the print screen is "5410" and the one used in JSON "accountNumber": {"value": "5800"}. 

 


@Anders Liljefors wrote:

Before the update, it was possible to book on a code part that did not contain all the characters.

Examples:
Default Code parts: 0-00-0000-00000
Works in UI: 0-00-0000-45 (works also via API, if the two char value is last in the code part)
Works in UI: 0-00-32-00000 (the value 32 does not work via API after update)

In the current setup, for instance, 
the missing chars of the segments based on segment's length that is not provided in the JSON should be automatically filled by the default subaccount values that has been set in the General Ledger Preferences(GL102000).
 

If the selected account is a "Cash Account" then the default subaccount value can be seen in the Cash accounts(ScreenId=CA202000)
Cash accounts.jpg

 

Please check the subaccount defaults and see what default values assigned when you enter the "accounts" in the lines of the Journal Transaction in the Financials ERP UI. 

 

Also,(if default values are not set for full segment lengths) try to provide the missing chars of the segments in your JSON based on its length. 
E.g. 

SegmentID: 3 
Length: 5 
Value: 00032

Anders Liljefors
CONTRIBUTOR *

Hi,

 

After some more testing, we can state that the problem only applies to journal transaction, if we book with the same values on the supplier invoice, it works with these values:
"segmentId": "3",
"segmentValue": "32"
The proposal  with zeros as padding does not work:
"segmentId": "3",
"segmentValue": "3200"
On the other hand, it works if we pad with spaces:
"segmentId": "3",
"segmentValue": "  32"

 

Code parts should work in the same way regardless of whether it is journal transaction or supplier invoice?

by Yıldırım (Updated ‎20-04-2022 18:22 by Yıldırım VISMA )

Hi, 

the change
"omitted segments will be assigned the default values as specified in the General ledger preferences (GL102000) window. For transaction lines including a cash account, the default subaccount as specified in the Cash accounts (CA202000) will be applied."
has only been applied to the POST JournalTransactionsV2 endpoint in 8.91. 

Therefore, please check the subaccount defaults and see what default values assigned when you enter the "accounts" in the lines of the Journal Transaction document in the Financials ERP UI. Also make sure the defaults values are set in your company based on the used account type.

 

If this doesn't help you find out the issue then we need to restore your database to be able to investigate further. 

Anders Liljefors
CONTRIBUTOR *

Hi,

 

Sorry if I was unclear, I have verified that everything works as it should in Financials ERP UI. The problem only occurs when we book a journal via the integration, before updating we could enter the segment value as follows:
"segmentId": "3",
"segmentValue": "32"

 

After your update, we need pad the segmentvalue
"segmentId": "3",
"segmentValue": "  32"

 

We have updated our integration to do this now and updated all our customers with a new version so the problem is no longer critical.

Hello, 

  • We understand that it works as expected in the UI, however the question is about what default subaccount values system assign in the UI ? 

  • What is the length of the "segmentID: 3 " ? Please send us a print screen from 
    Segment keys - "Subaccount" (ScreenId=CS202000)  so that we can try to configure our system with the same setup to be able to reproduce the issue. 
    Segment keys.jpg

Thanks.