In forms choose "next control"

marvinqmarvinq Member Posts: 69
Hi,

In a list form, I have a textbox with a another textbox defined in the property "NextControl". My problem is that I would like this to be dynamic. Say if a purchase line is of type "G/L account" then the NextControl is A and if the type is "item" the next control is B.

Is it possible to do so? Via som c-a/l code?

/MHQ

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Through properties, it is not possible.

    You can try to use Currform."The field".ACTIVATE in the OnDeactivate-trigger of the field that you are leaving, but I have some doubts.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • marvinqmarvinq Member Posts: 69
    Hi kriki,

    Thanks for feedback.

    My example is not great. The thing is that after entering a number in a purhase line I would like it to go to the number field in a new line.

    If I set the property "nextcontrol" to the same controlID, then it does so, just as a I wished. The problem is that this has to be conditional. If <some condition> then jump to new line, else do as always.

    I do not know if there are other better ways to solve this issue.

    Any ideas?



    /MHQ
  • kinekine Member Posts: 12,562
    I am afraid that there is no way around. This kind of customizations are the "hardest" even when they looks like the simplest. If you want to have it dynamic, you cannot use the NextControl property but xxx.ACTIVATE to activate some control e.g. in OnAfterValidate trigger. But I am not sure if you can jump to the new line by using this (I think that you cannot).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.