My Products
Help
CharlotteJB1
PARTNER

Error: Projekt + AO/ÄTA of Subaccount do not exist. POST SupplierInvoice

by CharlotteJB1 (Updated ‎20-01-2023 10:41 by Yıldırım VISMA )

Hi,

Our customer  (ID: 4228921) receives the following error message in Medius AP A from the API when supplier invoices are to be sent over;


Felmeddelande från ERP: 'requestUri: controller/api/v1/supplierinvoice / method: post / headers: Content: application/json Authorization: <******> ipp-application-type: Visma.net  Financials ipp-company-id: ****** / response content: {"message":"VismaId: 71451f44-0405-4e30-b8a5-ec08cdc2ef8c. Error creating supplierInvoice. Error: Inserting 'Supplier transactions' record raised at least one error. Please review the errors.\r\nAn error in processing of field Subaccount: Error: Projekt + AO/ÄTA of Subaccount do not exist."} / json response {"Version":

We have tried creating the invoice manually in Visma, but get no error. We see no error in the subaccount or the segment value. 

13 REPLIES 13
KonsultVn
CHAMPION ***

by KonsultVn

Hi,

To clearify the issue, it is not doable for our customers to activate all segment values. 

We have around 20 customers which are effected by this. Could we please take a meeting regarding this so we can move forward with a solution? 

 

You can email us three:

emelie.kristoffersson@exsitec.se 

charlotte.johnson@exsitec.se

linnea.eriksson@exsitec.se

 

Best regards,

Emelie. 

KonsultVn
CHAMPION ***

by KonsultVn

Hi,

I think we need to have a short meeting regarding this so we can move forward.

Can you email me, Charlotte and Linnea regarding a time that suits you asap? 

emelie.kristoffersson@exsitec.se 

charlotte.johnson@exsitec.se

linnea.eriksson@exsitec.se

 

Regards,

Emelie. 

Yıldırım
VISMA

by Yıldırım

Hello, can you send your payload ? 

Also, is there any Branch or user restriction for the Subaccount Segments in the Financials ERP company ? 

CharlotteJB1
PARTNER

by CharlotteJB1

Hi, 

There are no branch or user restriction for the Subaccount Segments in the Financials ERP company. 

 

 

{{
"SupplierNumber": {
"Value": "50048 "
},
"SupplierReference": {
"Value": "100006.1"
},
"Note": {
"Value": ";Administrationstjänster//;Omkostnader//"
},
"ReferenceNumber": null,
"CurrencyId": {
"Value": "SEK"
},
"Description": null,
"DueDate": {
"Value": "2023-02-16T01:00:00+01:00"
},
"Date": {
"Value": "2023-01-17T01:00:00+01:00"
},
"SupplierTaxZone": {
"Value": "01"
},
"PaymentRefNo": {
"Value": "100006"
},
"ExchangeRate": null,
"CashDiscountDate": {
"Value": "2023-02-16T01:00:00+01:00"
},
"PostPeriod": null,
"InvoiceLines": [
{
"LineNumber": {
"Value": 1
},
"TransactionDescription": null,
"CostInCurrency": {
"Value": 34246.58
},
"AccountNumber": {
"Value": "4990"
},
"VatCodeId": {
"Value": "01"
},
"DeferralCode": {
"Value": null
},
"Operation": "Insert",
"SplitHierarchy": null,
"SplitLine": null,
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "30098"
},
{
"SegmentId": 2,
"SegmentValue": "30098A001"
},
{
"SegmentId": 3,
"SegmentValue": "000"
},
{
"SegmentId": 4,
"SegmentValue": "00"
}
]
},
{
"LineNumber": {
"Value": 3
},
"TransactionDescription": null,
"CostInCurrency": {
"Value": -0.23
},
"AccountNumber": {
"Value": "3740"
},
"VatCodeId": {
"Value": "12A"
},
"DeferralCode": {
"Value": null
},
"Operation": "Insert",
"SplitHierarchy": null,
"SplitLine": null,
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "00000"
},
{
"SegmentId": 2,
"SegmentValue": "00000000"
},
{
"SegmentId": 3,
"SegmentValue": "000"
},
{
"SegmentId": 4,
"SegmentValue": "00"
}
]
}
],
"TaxDetailLines": null,
"DocumentType": {
"Value": "Invoice"
}
}}

Yıldırım
VISMA

by Yıldırım

Hello, 

 

Please don't send key-value in the payload with empty or null, you can find the edited version of your JSON below. 

View more

{
"SupplierNumber": {
"Value": "50048 "
},
"SupplierReference": {
"Value": "100006.1"
},
"Note": {
"Value": ";Administrationstjänster//;Omkostnader//"
},
"CurrencyId": {
"Value": "SEK"
},
"DueDate": {
"Value": "2023-02-16T01:00:00+01:00"
},
"Date": {
"Value": "2023-01-17T01:00:00+01:00"
},
"SupplierTaxZone": {
"Value": "01"
},
"PaymentRefNo": {
"Value": "100006"
},
"CashDiscountDate": {
"Value": "2023-02-16T01:00:00+01:00"
},
"InvoiceLines": [{
"LineNumber": {
"Value": 1
},
"CostInCurrency": {
"Value": 34246.58
},
"AccountNumber": {
"Value": "4990"
},
"VatCodeId": {
"Value": "01"
},
"Operation": "Insert",
"Subaccount": [{
"SegmentId": 1,
"SegmentValue": "30098"
},
{
"SegmentId": 2,
"SegmentValue": "30098A001"
},
{
"SegmentId": 3,
"SegmentValue": "000"
},
{
"SegmentId": 4,
"SegmentValue": "00"
}
]
},
{
"LineNumber": {
"Value": 3
},
"CostInCurrency": {
"Value": -0.23
},
"AccountNumber": {
"Value": "3740"
},
"VatCodeId": {
"Value": "12A"
},
"Operation": "Insert",
"Subaccount": [{
"SegmentId": 1,
"SegmentValue": "00000"
},
{
"SegmentId": 2,
"SegmentValue": "00000000"
},
{
"SegmentId": 3,
"SegmentValue": "000"
},
{
"SegmentId": 4,
"SegmentValue": "00"
}
]
}
],
"DocumentType": {
"Value": "Invoice"
}

}

Additionally, please send us a print screen showing your subaccount > Segment & Values from the Financials ERP UI. 


Segment Keys <ScreenId=CS202000&DimensionID=SUBACCOUNT>

Segment keys.jpg

then by clicking "segment ID" you can check available Segment Values for the Subaccount
Segment values.jpg

CharlotteJB1
PARTNER

by CharlotteJB1

Bild 1 .jpg

Bild 2.jpg

Bild 3.jpg

   

CharlotteJB1
PARTNER

by CharlotteJB1

We send your jason file, but get the same error. 

Yıldırım
VISMA

by Yıldırım

Can you please make sure that subaccount combination sent in the payload exist in the following module ? 

 

<ScreenId=GL203000>
Subaccounts.jpg

CharlotteJB1
PARTNER

by CharlotteJB1

bild 4.jpg

Yıldırım
VISMA

by Yıldırım

I've noticed that SegmentID=2 (Projekt+AO) has length 9 with validation, but in the payload you're sending 8 zeros so please add one more zero and try again.

"Operation": "Insert",
"Subaccount": [{
"SegmentId": 1,
"SegmentValue": "00000"
},
{
"SegmentId": 2,
"SegmentValue": "00000000"
},
{
"SegmentId": 3,
"SegmentValue": "000"
},
{
"SegmentId": 4,
"SegmentValue": "00"
}
]
}
],

 

CharlotteJB1
PARTNER

by CharlotteJB1
Thanks!    (ID: 4228921) is now up and running. 
We have the same error with company ID:44810221374141, we checked the length of segmentvalue and it's correct. 
 
CharlotteJB1
PARTNER

by CharlotteJB1

{{
"SupplierNumber": {
"Value": "50063"
},
"SupplierReference": {
"Value": "097889152621"
},
"Note": {
"Value": "https://cloud.mediusflow.com/hevinghagglund/#Tasks/ShowDocument/475"
},
"ReferenceNumber": null,
"CurrencyId": {
"Value": "SEK"
},
"Description": null,
"DueDate": {
"Value": "2023-02-25T01:00:00+01:00"
},
"Date": {
"Value": "2023-01-11T01:00:00+01:00"
},
"SupplierTaxZone": {
"Value": "01"
},
"PaymentRefNo": {
"Value": "097889152621"
},
"ExchangeRate": null,
"CashDiscountDate": {
"Value": "2023-02-25T01:00:00+01:00"
},
"PostPeriod": null,
"InvoiceLines": [
{
"LineNumber": {
"Value": 1
},
"TransactionDescription": null,
"CostInCurrency": {
"Value": 409.52
},
"AccountNumber": {
"Value": "4099"
},
"VatCodeId": {
"Value": "01"
},
"DeferralCode": {
"Value": null
},
"Operation": "Insert",
"SplitHierarchy": null,
"SplitLine": null,
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "8755101"
},
{
"SegmentId": 2,
"SegmentValue": "1406"
},
{
"SegmentId": 3,
"SegmentValue": "30"
}
]
},
{
"LineNumber": {
"Value": 2
},
"TransactionDescription": null,
"CostInCurrency": {
"Value": 0.1
},
"AccountNumber": {
"Value": "3740"
},
"VatCodeId": {
"Value": "12A"
},
"DeferralCode": {
"Value": null
},
"Operation": "Insert",
"SplitHierarchy": null,
"SplitLine": null,
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "1000100"
},
{
"SegmentId": 2,
"SegmentValue": "0000"
},
{
"SegmentId": 3,
"SegmentValue": "00"
}
]
}
],
"TaxDetailLines": null,
"DocumentType": {
"Value": "Invoice"
}
}}

Yıldırım
VISMA

by Yıldırım

If you're having the same issue for the other companies, please follow the troubleshooting steps that has been provided earlier. If it doesn't help, then again send us the segment key - values setup in the format of the ones shared earlier, for each company.

Thanks.