For example, if we want to trtransfer parameters between form objects , like from FORM 1 to FORM 2, and then from FORM 2 to FORM 3, how to can we make it in Navision?? :?: Thanks! O:)
I have 4 forms, Main Menu-1, Main Menu-2, SubMenu, and Purchase Order. I need to identify from which Main Manu (Main Menu-1 or Main Menu-2) that User entered to the Purchase Order, so that I can decide which function should be run when I click "post" buttin on Purchase Order .
I don't know if this one is the best solution, but a least this would be of help.
What you can do is:
1.) In the form object of the PO, you may want to have a variable (this variable will serve as Flag). Say for instance you declared it as 'vFlg'.
2.) After creating this variable, you also create a function, we name it 'InitFlg' function (also within the PO form object).
This function should have a parameter, we name the parameter 'pFlg'.
3.) In the 'InitFlg' function that we created you code this:
vFlg := pFlg;
4.) On the 'OnPush' trigger of the 'Order' button of the two Main Menu, you declare a form variable. The subtype of this variable should be the form object of the PO. Let's name it 'frmPO'.
5.) After declaring this variable you code this accordingly:
frmPO.InitFlg('Menu1');
frmPO.RUN;
6.) On the 'OnPush' trigger of the 'Post' button you can test the value of 'vFlg' variable and execute the respective code.
Comments
Manila, Phils.
What I want to do is, for example --
I have 4 forms, Main Menu-1, Main Menu-2, SubMenu, and Purchase Order. I need to identify from which Main Manu (Main Menu-1 or Main Menu-2) that User entered to the Purchase Order, so that I can decide which function should be run when I click "post" buttin on Purchase Order .
What you can do is:
1.) In the form object of the PO, you may want to have a variable (this variable will serve as Flag). Say for instance you declared it as 'vFlg'.
2.) After creating this variable, you also create a function, we name it 'InitFlg' function (also within the PO form object).
This function should have a parameter, we name the parameter 'pFlg'.
3.) In the 'InitFlg' function that we created you code this:
4.) On the 'OnPush' trigger of the 'Order' button of the two Main Menu, you declare a form variable. The subtype of this variable should be the form object of the PO. Let's name it 'frmPO'.
5.) After declaring this variable you code this accordingly:
6.) On the 'OnPush' trigger of the 'Post' button you can test the value of 'vFlg' variable and execute the respective code.
Manila, Phils.
How To pass parameters between objects (forms, reports, ...)?
How To pass parameters between objects (forms, reports, ...)? Revisited