My Products
Help

Message: Another user has updated the 'APRegister' line. While post Attachement SupplierInvoice

by Roland van Belle - Consolit

We get an error while posting an attachement to a SupplierInvoice.

Before this action we had released the same invoice. Unfortunately some invoices suceed and some invoices get this error. Today, we saw that the error occurs with some creditors (it seems).

 

HttpError=500 api/v1/supplierInvoice/documentType/Invoice/<invoicenumber>/attachement Post.

 

Error: Another user has updated 'APRegister' line. The page will now reload and your changes will be lost.

 

We don't understand why we have this error. Can you please help us?

5 REPLIES 5

by HoriaCalborean

Hello. Can you please provide the company id, the invoice number for a failing request, and a timestamp of the request (UTC or with the timezone)?

We believe that the cause of this is that the RELEASE call is asynchronous. You get a 200 response immediately but the release process continues. When the POST of the attachment comes to the API, the release is not yet finished so the two processes run in parallel, and the exception is triggered.
You could try to get the status of the invoice and see if that status is "Open". Only when the status is "Open" you will send the attachment.

We are also investigating the proper solution for you to further implement this IF the above assumption proves correct.

CompanyID: 4622844

We processed some testinvoices:

RolandvanBelleConsolit_0-1681199026421.png

As you can see, these are all the same invoices. Some with an attachement, some without.

 

Vendor C1010155 always got an attachement.

Vendor C1010092 always not got an attachement.

 

That was a strange coincidence.

 

It's the same invoice, but another vendor. Unfortunately I don't have the exact timestamp of the request atm.

 

Your assumption does sound plausible.

by Yıldırım (Updated ‎07-04-2023 13:48 by Yıldırım VISMA )

Hello, according to information we've received from our development team,

 

Another user has updated 'APRegister' line. - this usually means that userA tries to modify the APRegister but the APRegister has an older version (because UserB changed the APRegister before) in other words, UserA is working on an old version of APRegister.

adrianm
PARTNER

by adrianm

Another user has updated 'APRegister' line. - this usually means that userA tries to modify the APRegister but the APRegister has an older version (because UserB changed the APRegister before) in other words, UserA is working on an old version of APRegister.


Can you please stop spreading this myth.

That scenario might make sense in the GUI but in the API the message just means "The backend crashed without error message".

 

 

Thanks for your reply. We understand the errormessage. But we make all changes with API calls.

First we send the RELEASE call, after we receive the response, we send the ATTACHEMENT call.

 

We don't change anything by hand. How is it possible we get the message in this situation?