Options

Lookup. FORM.RUN(Num) Num can be different. How take value?

randrewsrandrews Member Posts: 135
In triger OnLookup I want to run form with number Num.

FORM.RUN(Num,Rec) I cant use, because Rec can be varous subtype.

If I use FORM.RUN(Num) then i didn't know where to give value for the Text ( var in OnLookup)

How to solve this problem?

Comments

  • Options
    TRSOEgroupTRSOEgroup Member Posts: 37
    randrews wrote:
    In triger OnLookup I want to run form with number Num.

    FORM.RUN(Num,Rec) I cant use, because Rec can be varous subtype.

    If I use FORM.RUN(Num) then i didn't know where to give value for the Text ( var in OnLookup)

    How to solve this problem?

    make a record variable and set the filters/ranges you want on the rec variabel and pass that as an argument in form.run(rec)
  • Options
    randrewsrandrews Member Posts: 135
    TRSOEgroup wrote:
    randrews wrote:
    In triger OnLookup I want to run form with number Num.

    FORM.RUN(Num,Rec) I cant use, because Rec can be varous subtype.

    If I use FORM.RUN(Num) then i didn't know where to give value for the Text ( var in OnLookup)

    How to solve this problem?

    make a record variable and set the filters/ranges you want on the rec variabel and pass that as an argument in form.run(rec)

    You don't understand problem.

    For example:
    I have a setup table with fields
    1) Code
    2) Form ID (here lookup forms)
    3) I can add number of sourcetable of Form ID
    So i want to run lookup in other place, where i read the setup table. I know only ID of objects, but i can't create the variable record dinamicaly.
  • Options
    kinekine Member Posts: 12,562
    I think that C/AL is not enough dynamic to be able to do that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.