How to point on a record?

deepbluedeepblue Member Posts: 152
hello,

I have a card-form in wich i added un button to run a form with the list of the records. but i dont know how to make the list form point into the record that was displayed in the card-form. How could I make it?

Thank you?

Answers

  • kinekine Member Posts: 12,562
    If you will use just LookupTable action, the opened form will be set to the current record (if there is not used property SourceTablePlacement). If you are opening another form than lookup form, you can try to use property RunFormOnRec on the command button...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • deepbluedeepblue Member Posts: 152
    I have this code in the button
    IF <Condition> THEN
      formlist.RUN
    ELSE
      CurrForm.CLOSE;
    END
    
    RunFormRec doesn't work! :(
  • kinekine Member Posts: 12,562
    Ok, if you are running the form through code, try this:
    IF <Condition> THEN begin
      formlist.SETTABLEVIEW(Rec);
      formlist.SETRECORD(Rec);
      formlist.RUN;
    end ELSE
      CurrForm.CLOSE;
    END 
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • deepbluedeepblue Member Posts: 152
    Thank u Kine it works well!!!! :D
    =D> \:D/
Sign In or Register to comment.