Form update fails at activated record

MogMog Member Posts: 34
Hello,

I have a Listform that displays some data according to a filter. Above the form is an option field to manipulate the filter, some code in the OnValidate trigger simply calls a function that makes some SETRANGES, and other data is displayed. Works well so far, but there is a little problem. The complete displayed data changes, but not the record the user clicked on. He has to leave this record and then click it again to make it disappear. This is ugly. I tried to use CurrForm.UPDATE(false) at the end of the trigger and the funciton to avoid this, but Navision throws an error "You cannot use CurrForm.UPDATE here". Does anyone have a hint?

regards

Mog

PS: I'm using Navision 4.00 SP3

Comments

  • kinekine Member Posts: 12,562
    The CurrForm.UPDATE(false) must be called on the subform, not on the main form...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MogMog Member Posts: 34
    there is no main- and subform, it's just one form
  • garakgarak Member Posts: 3,263
    OnValidate of the control (Textbox) or of a Textbox with fieldrelation :?:

    Normaly CurrForm.update(false) is enough
    Do you make it right, it works too!
  • MogMog Member Posts: 34
    it works when placing currForm.UPDATE(false) in the onAfterValidate()-Trigger, not in onValidate()...

    thanks!
Sign In or Register to comment.