Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Error An Item was made to change an old version of a Item record

Posted on by 2,576

Hi all,

I have written code to automatically post the Item journal lines after it is created. The journal lines are successfully posted but I get an error that 'An Item was made to change an old version of a Item record. The record should first be reread from the database. This is a programming error. Identification fields and values:..'

Can someone suggest how should this be solved?

*This post is locked for comments

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Error An Item was made to change an old version of a Item record

    This might guide you to solution: community.dynamics.com/.../error-an-attempt-was-made-to-change-an-old-version-of-a-sales-line-record

  • Tina Menezes Profile Picture
    Tina Menezes 2,576 on at
    RE: Error An Item was made to change an old version of a Item record

    I have written code to insert data into the item journal and after that to post the inserted data.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Error An Item was made to change an old version of a Item record

    Please send us the code

  • Tina Menezes Profile Picture
    Tina Menezes 2,576 on at
    RE: Error An Item was made to change an old version of a Item record

    Hi Suresh,

    I am using setrange and findfirst and then posting the record.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Error An Item was made to change an old version of a Item record

    Tina,

    Are you making any changes to the Item record during posting, you need to use a GET statement.

  • Binesh Profile Picture
    Binesh 7,885 on at
    RE: Error An Item was made to change an old version of a Item record

    Hello Tina,

    Could you share your code, so we can check.

  • Tina Menezes Profile Picture
    Tina Menezes 2,576 on at
    RE: Error An Item was made to change an old version of a Item record

    Hi Binesh,

    I used Commit. I still get the error. Can you please elaborate?

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: Error An Item was made to change an old version of a Item record

    Hello Tina,

    Use COMMIT function. so before fetching it saved in DB, and also after posting you have to call so it saved the current record.

    It mostly came, when the record moved/deleted in background and, in front-end, still user open this record.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans