Error: "Another User modified........"

DeepDeep Member Posts: 569
Dear All,

I am facing a problem.
I have got a boolean say Boolean1 on Gen. Journal Line. On the Journal Voucher Form, I want to mark all the boolean 1 of the same document no.=True or False when I click on the first line boolean1. For example.

DocNo. Amount Boolean1
DOC001 100.00
DOC001 200.00
DOC001 300.00
DOC002 100.00
DOC002 200.00

Now when I click on First line boolean1, all the three lines with the same document no. (DOC001) must be true automatically. The scene should be like below after clicking line 1.

DocNo. Amount Boolean1
DOC001 100.00 TRUE
DOC001 200.00 TRUE
DOC001 300.00 TRUE
DOC002 100.00
DOC002 200.00

The error is, when I click the first line, the booleans get update on the table, but the form flashes an error " ANother User has modified the record for the Gen.Jour. Line after you retrieved it from the database."

The code has been written on the table field=Boolean1.

Kindly help with your suggestions.
Regards,

Deep
India

Answers

  • tinoruijstinoruijs Member Posts: 1,226
    In the form in the OnAfterValidate of the boolean1-checkbox put CurrForm.UPDATE;

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • DeepDeep Member Posts: 569
    tinoruijs wrote:
    In the form in the OnAfterValidate of the boolean1-checkbox put CurrForm.UPDATE;

    Already done, but of no use.
    Regards,

    Deep
    India
  • arindomarindom Member Posts: 52
    Remove the code from table Boolean field onvalidate .Write in Form Boolean field Onvalidate then CURRFROM.UPDATE .
  • bappaditya44bappaditya44 Member Posts: 14
    In table level create one function and put the code you written in Onvalidate of boolean1 into that function.In Form level OnAfterValidate call that function and then write
    currform.update

    Hopefully it will work ..
  • DeepDeep Member Posts: 569
    Yeah. Thanks bappaditya44.

    It works.
    Regards,

    Deep
    India
Sign In or Register to comment.