Options

Error on coding -An attempt was made to change an old version of a Transfer Line record

T222T222 Member Posts: 63


Hi , I have a customized code on 5704 -TransferOrder-Post Shipment codeunit in order to check that user who ship is not the same who receives
and i have this code (is from previous version)

CLEAR(usersetup);
usersetup.GET(USERID);
IF NOT usersetup."Allow Transfers from All Loc." THEN BEGIN
IF "Transfer-from Code" <> usersetup."Default Location" THEN
ERROR(Text009,usersetup."Default Location");
END;

usersetup is a global variable with subtype User Setup table
The system gives me an error
An attempt was made to change an old version of a Transfer Line record. The record shoud first be rehead from the database. This is a programming error. Identification fields and values ...


Can someone help on this please?

Best Answer

  • Options
    KishormKishorm Member Posts: 921
    Answer ✓
    The code you have provided would not cause the error you are getting. Activate the debugger to see where the error is occurring.

Answers

  • Options
    KishormKishorm Member Posts: 921
    Answer ✓
    The code you have provided would not cause the error you are getting. Activate the debugger to see where the error is occurring.
Sign In or Register to comment.