Track an Event / Trigger when we click a Navigation button..

vipinkuruvillavipinkuruvilla Member Posts: 143
Hai,

I have written validation for some fields in the onquerycloseform event(). It validates when we try to close the form.

However if I navigate to another records and from there if I try to close the form, it does not validate the previous record and closes the form. The previous record gets saved without validating the fields.

Can anyone let me know how to track this when I clcik on the navigation button??

Thanks in advance.........

Vipin...

Comments

  • krikikriki Member, Moderator Posts: 9,115
    you can try with on OnFindRecord-trigger or the OnNextRecord-trigger.
    But in this case you also will have to program them to also handle the navigating.

    In general it is very difficult to do that kind of validation. It is best (=easiest) to validate the record when a user wants to use it.
    For example when creating a customer-record, you can automatically block the record and when the user wants to un-block it, you can test your fields.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • vipinkuruvillavipinkuruvilla Member Posts: 143
    Kriki,

    I had put some code in the triggers which u have mentioned. But even the break point didnt get activated in those trigger when I clicked the navigation button......

    Kindly advice....
  • krikikriki Member, Moderator Posts: 9,115
    Kriki,

    I had put some code in the triggers which u have mentioned. But even the break point didnt get activated in those trigger when I clicked the navigation button......

    Kindly advice....
    You might try to use OnAfterGetCurrentRecord, but remember you MAY NOT HAVE AN ERROR HERE, otherwise the form closes.
    But like I already said:
    In general it is very difficult to do that kind of validation. It is best (=easiest) to validate the record when a user wants to use it.
    For example when creating a customer-record, you can automatically block the record and when the user wants to un-block it, you can test your fields.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.