Validation upon Leaving Page in NAV 2009

CHADELCHADEL Posts: 7Member
Hello. I am currently working on a project in NAV 2009 and I can't find a way on how to validate fields in creating a new customer in Customer Card. I would like to prompt an error message if a required field is empty upon leaving or closing the page. I tried TESTFIELD on the OnInsert, OnOpenPage, OnAfterGetCurrRecord but even though the page is still not opening, the error message appears. Is there any way on how to do this? Thank you.

Answers

  • DuikmeesterDuikmeester Hoorn, The NetherlandsPosts: 290Member
    Use:
    OnQueryClosePage(CloseAction : Action None) : Boolean
    

    Check what is the CloseAction then return EXIT(FALSE) so the page stays open.
  • CHADELCHADEL Posts: 7Member
    Yeah. I already have that. But it only executes when I close the page. It doesn't run when I switch to other pages.
  • DuikmeesterDuikmeester Hoorn, The NetherlandsPosts: 290Member
    Set the page property RefreshOnActivate=Yes
  • CHADELCHADEL Posts: 7Member
    It's already set to Yes.
Sign In or Register to comment.