Options

Creating lines from a Lookup Form

FermiFermi Member Posts: 27
Hi,

I am creating lines in a subform, and one of the fields has a table relation with another table. If I use lookup in this field, I go to the lookup form.

I want that when I select several records in the lookup form (I use MARK and SETSELECTIONFILTER), several lines are created in the original subform. I´ve tried everything but I am only able to create one line, or in the other hand, the process creates lines for all records in the table of the lookup form.

Could anybody help me?

Thaks a lot,friends
Best Regards,

Manuel Barral Paul

Comments

  • Options
    kinekine Member Posts: 12,562
    You must create your own OnLookup, call the form through some variable of type Form, in the form create function like GetSelectedRecords with one Var parameter, in the function you will have:
    Procedure GetSelectedRecord(var Param:Record xxxx);
    begin
      CurrForm.SETSELECTIONFILTER(Param);
    end;
    

    throug this function you can transfer selected lines to you sub form and in a loop create needed lines...

    It is only fast made example, how to do that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.