Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

An attempt was made to change an old version of a transfer header record in dynamics nav 2015

(0) ShareShare
ReportReport
Posted on by 6

Hello Everyone,

I add two fields in Posted Transfer Shipment table Total Quantity and amount by using calcfield on Transfer Shipment Line table. To calculate amount against each item i use code and insert in Amount Field and modify that field. It work fine but is that when i create new transfer order it display an error message "An attempt was made to change an old version of a transfer header record. The record should be reread from the database."

This code i use to modify amount field.

TransShpLine.RESET;
TransShpLine.SETAUTOCALCFIELDS(TransShpLine.ItemAmount);
TransShpLine.SETRANGE(TransShpLine.Calculated,FALSE);

IF TransShpLine.FINDSET THEN REPEAT
TransShpLine."Document No." := TransShpLine."Document No.";
TransShpLine."Line No." := TransShpLine."Line No.";
TransShpLine.Amount := (TransShpLine.Quantity * TransShpLine.ItemAmount);
TransShpLine.Calculated := TRUE;
TransShpLine.MODIFY;
UNTIL TransShpLine.NEXT = 0;
MESSAGE('Done');

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: An attempt was made to change an old version of a transfer header record in dynamics nav 2015

    Why in the FINDSET loop you re-assign Document No and Line No with the same values?

    You can remove these lines:

    TransShpLine."Document No." := TransShpLine."Document No.";

    TransShpLine."Line No." := TransShpLine."Line No.";

  • Hannes Holst Profile Picture
    5,767 on at
    RE: An attempt was made to change an old version of a transfer header record in dynamics nav 2015

    Could you post the code which modifies the Transfer Header.

  • Mubasher Profile Picture
    6 on at
    RE: An attempt was made to change an old version of a transfer header record in dynamics nav 2015

    Transfer header

  • Hannes Holst Profile Picture
    5,767 on at
    RE: An attempt was made to change an old version of a transfer header record in dynamics nav 2015

    Does the error say "Transfer Header" or "Transfer Line"?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans