Options

Can't call CURRFORM.UPDATE from onValidate Code

jemmyjemmy Member Posts: 247
Folks,

When I called CurrForm.update in onValidate code trigger, Navision showed error (in the run-time):
CurrForm.UDPATE cannot be called from here

Then I have replaced it to the onActivate.

But I'm still courius want to know what restrictions behind it...
Please let me know your opinion on these.

Thanks in advance,

Jemmy

Comments

  • Options
    kinekine Member Posts: 12,562
    Curr.Form.UPDATE - objective is to refresh data in controls - but in OnValidate trigger the system still does not know if the data which is validating are ok or not => system is not able to refresh data in the control...(you cannot update form within data processing trigger which is called in writing process)

    It is clear? (it is only my explanation, I do not know exact or official reason...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    jemmyjemmy Member Posts: 247
    If so, I think I have to move it to OnAfterValidate.
    Thanks Kine. :)

    Jemmy
Sign In or Register to comment.