Can we transfer parameters between objects in Navision?

atreatre Member Posts: 39
Hi all,

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:)

Comments

  • jmlozaresjmlozares Member Posts: 110
    First, I want to know what do you want to achieve?
    Janderol Lozares Jr.
    Manila, Phils.
  • atreatre Member Posts: 39
    Hello jmlozares,

    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 .
  • jmlozaresjmlozares Member Posts: 110
    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.
    Janderol Lozares Jr.
    Manila, Phils.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • atreatre Member Posts: 39
    that's exactly what I need, thanks for everyone who replies :D
Sign In or Register to comment.