Error in post

Hi All,

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

give me some suggestion.

Thanks

Suggestion: Find out what have been changed and look into that code - Simply do as the errormessage tells you to.

How do you expect us to be able to help you?. Your question could be my car won’t start. Please give me suggestion!

  1. What version of NAV are we talking about (Version and Build No.)

  2. How you or anyone else can reproduce the error with an example

  3. What you would expect of result when doing no. 2

  4. What you have done to find out what could be the problem (So we at least know that you have tried to find out yourself)

  5. Remember people are trying to help for free, in their free sparetime. Give the at least the credit of doing something before you ask.

Hello Sir,

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.

once again Thank You Sir

Have a Nice day…

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.

Have a nice day you too…

Ok Sir, First I will try myself, then if I am not get then I will put on forum.

Thanks

Just start by using:

And then follow Palle’s tips:

  1. What version of NAV are we talking about (Version and Build No.)

  2. How you or anyone else can reproduce the error with an example

  3. What you would expect of result when doing no. 2

  4. What you have done to find out what could be the problem (So we at least know that you have tried to find out yourself)

  5. Remember people are trying to help for free, in their free sparetime. Give the at least the credit of doing something before you ask.

I can also recommend you to read this link:

[View:~/about/w/faq/180/how-to-ask-a-question-in-the-forums:320:50]

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.

Thanks

Regards

SB.