Question about form

Hi to all, I'm new with Navision and so, for sure I'm doing something wrong but I'm facing a behavior that I can't understand......
A brief recap
I have a custom table with a custom Form with several fields
In custom Form I've written some code on OnLookup event of a field to open a Lookup Form already filtered and select a record.

All works fine till today.......today I've made a modification on the underneath table to customize the code for the OnValidate event of another field !!!!
Recompiling the table, the lookup on the form stops working, the behavior is the following......the lookup correctly opens with the correct filters but clicking on OK button the selection is not inserted in the related form field.......I haven't changed anything on the form, only on the underneath table but it seems this broke something on the form behavior......
I'm fully aware this is a weird thing.....can someone help me to investigate the problem ?

I don't want to delete and create the form from fresh because I'm afraid I can loose some other customization.......

Thank you in advance for your feedback.

Best regards
Fabrizio

Answers

  • vaprogvaprog Member Posts: 1,140
    Hi Fabrizio

    Sounds strange! Without a chance of inspecting your code I can't think of what went wrong. Apparently, the lookup on the form does something more than lookup, and triggers some code you changed which somehow reverts the value set by the lookup.

    With a lookup on the form you have a chance to just lookup the value without any record change. The value then is validated when you confirm the value looked up.

    Refer to the following threads for more information:
    Lookup - Best Way and The Difference
    RunModal with temp table

    If you do your lookup as per my recommendation in those threads, and if you still experience troubles, you will certainly have the same troubles, if you type in the value, rather than use the lookup form.
Sign In or Register to comment.