I have one error in webClient in AL when I have post a purchase order…error
An attempt was made to change an old version of a Purchase Header Record.The Record should first be reread from the database this is a programming error
Thanks for reply I agree with you sir , But I am working in AL so when I get error I directly put first on forum then I am searching. if I get some solution then i am also putting solution on forum. I thought if anyone faced that type error it will help to me. okey next time i will follow your suggestions. But now I got solution for above error.
here I have called a function, in these function I passed a record variable and modified this table. that’s why i get that error, But when I passed a reference variable in this function it is worked perfectly.
Every time you add a fine new question, people get notified, and some even try to help you…while you are researching for the solution yourself - and finds it.
With that, you often end up wasting other peoples time, and you just might end up with people not helping you specifically… well because you are figuring it out anyway quite soon.
So wait with your question until you have at least tried a few things.
Hi Akkrahul - You are trying to use the MODIFY statement and when you are Modifying use a Record variable. For example if you are modifying purchase record first declare a variable PurchRec Record Purchase header. Get the record and usinig PurchRec and then modify and also before modifying use the function SELECTLATESTVERSION and it will work.