Quantcast
Channel: Microsoft Dynamics NAV Forum - Recent Threads
Viewing all articles
Browse latest Browse all 29197

"An attempt was made to change an old version of a Sales Line record" after changing Quantity

$
0
0

Hello community

I did a test migration from NAV 2015 to 2018 CU5 (CH-version).

It seems to work fine, but when I add a new line in a new order or a new quote, it is not possible to change the quantity or the unit price directly.

I get the following message:
"An attempt was made to change an old version of a Sales Line record. The record should be reread from the database. This is a programming error.Identification fields and values:Document Type='Quote',Document No.='VA112244',Line No.='10000'"

After a refresh, I can enter the correct value normally. 

I debugged the session and could find the following problem code (debugger stops at red marker):

Page 95: Sales Quote Subform

QuantityOnAfterValidate()

  IF Reserve = Reserve::Always THEN BEGIN
    CurrPage.SAVERECORD;
    AutoReserve;
  END;
  
  IF (Type = Type::Item) AND
     (Quantity <> xRec.Quantity)
  THEN
    CurrPage.UPDATE(TRUE);

Any ideas why this is happening? I did not change this code so it seems to be default.

Thank you.

Best regards

Raphael


Viewing all articles
Browse latest Browse all 29197

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>