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
This might guide you to solution: community.dynamics.com/.../error-an-attempt-was-made-to-change-an-old-version-of-a-sales-line-record
I have written code to insert data into the item journal and after that to post the inserted data.
Please send us the code
Hi Suresh,
I am using setrange and findfirst and then posting the record.
Tina,
Are you making any changes to the Item record during posting, you need to use a GET statement.
Hello Tina,
Could you share your code, so we can check.
Hi Binesh,
I used Commit. I still get the error. Can you please elaborate?
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156