Hi All,
I am facing an issue with Navision over SQL server where when I try to post transactions from the Production Journal for a released Production order, I am being given the error:
"Another user has modified the record for this reservation entry after you retrieved it from the database. Enter your changes again in the updated window, or start the interrupted activity again. Identification fields and values: Entry No.=209626, Positive='No'"
Investigations the transactions and background processes seems to indicate that the problem is originating from Codeunit 99000830 "Create Reserv. Entry". in the function "TransferReservEntry" at the NewReservEntry.MODIFY line of the following code:
END ELSE BEGIN
NewReservEntry.MODIFY;
TransferQty := NewReservEntry."Quantity (Base)";
IF NewReservEntry."Source Type" = DATABASE::"Item Ledger Entry" THEN BEGIN
IF NewReservEntry.GET(NewReservEntry."Entry No.",NOT NewReservEntry.Positive) THEN BEGIN // Get partner-record
IF NewReservEntry."Quantity (Base)" < 0 THEN
NewReservEntry."Expected Receipt Date" := 0D
ELSE
NewReservEntry."Shipment Date" := 31129999D;
NewReservEntry.MODIFY;
END;
on a local native copy of the database transactions post ok, Problem only occurs on SQL server. Transactions that seem to trigger the issue have Reservation type set as Tracking in the recordset.
I am suspecting the reason to be SQL's record locking. Would appreciate any possible solution that would not have any adverse effect upon posting of the journal, considering the complexity of Reservation entry processing within Navision
0
Comments
You can also do a get with a different variable and pass the new values to ti and update the record.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
CORRECTION (BUG 12455)
Codeunit 99000830, TransferReservEntry
...
NewReservEntry := OldReservEntry;
IF NewReservEntry.RECORDLEVELLOCKING THEN // new line
NewReservEntry.MODIFY; // new line
NewReservEntry."Source Type" := NewType;
...
Codeunit 99000838
TransferPOCompToItemJnlLine function
IF ReservEngineMgt.InitRecordSet(OldReservEntry) THEN
REPEAT
OldReservEntry.TESTFIELD("Item No.",OldProdOrderComp."Item No.");
OldReservEntry.TESTFIELD("Variant Code",OldProdOrderComp."Variant
Code");
OldReservEntry.TESTFIELD("Location Code",OldProdOrderComp."Location
Code");
TransferQty := CreateReservEntry.TransferReservEntry(DATABASE::"Item
Journal Line",
NewItemJnlLine."Entry Type",NewItemJnlLine."Journal Template
Name",NewItemJnlLine."Journal Batch Name",0,
NewItemJnlLine."Line No.",NewItemJnlLine."Qty. per Unit of
Measure",OldReservEntry,TransferQty);
OldReservEntry.GET(OldReservEntry."Entry No.",OldReservEntry.Positive);
//New line
IF ReservEngineMgt.NEXTRecord(OldReservEntry) = 0 THEN
IF ItemTrackingFilterIsSet THEN BEGIN
OldReservEntry.SETRANGE("Serial No.");
OldReservEntry.SETRANGE("Lot No.");
ItemTrackingFilterIsSet := FALSE;
EndLoop := NOT ReservEngineMgt.InitRecordSet(OldReservEntry);
END;
UNTIL EndLoop OR (TransferQty = 0);
Hope this can be of help to those who encounter this issue....
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
...
Everybody on-line.
...
Looking good!
But with 4? they've started programming programming in SQL. So things turn the other way around.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Shouldn't this bug fix be implemented in this version?
Regard,
...
Everybody on-line.
...
Looking good!
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I used the bug fix suggested by kjspiteri, and it works.
Still, thanks for your help!
...
Everybody on-line.
...
Looking good!
i'm having the same problem but the solution that kjspiteri provided is no good for me...
Now, the error appears on the new lines:
Any news on this issue?
Thanks in advance