Display MasterFieldLinks Editor

TECH TIP: Display DataPipeline.MasterFieldLinks Editor in code

uses
  ppForms, ppFLnkEd;


procedure TForm1.DisplayFieldLInkEditor;
var
  lFormClass : TFormClass;
  lFieldLinkEd: TppCustomMasterFieldLinkEditor;

begin

  {the detail pipeline's masterdatapipeline property needs 
   to be set prior to using the field link editor}

  if (myDetailPipeline.MasterDataPipeline = nil) then
    myDetailPipeline.MasterDataPipeline := myMasterPipeline;

  {get the registered field link editor class}
  lFormClass := ppGetFormClass(TppCustomMasterFieldLinkEditor);

  {create the field link editor}
  lFieldLinkEd := TppCustomMasterFieldLinkEditor(lFormClass.Create(Application));
  lFieldLinkEd.DataPipeline := myDetailPipeline;

 try
    lFieldLinkEd.Execute;
  finally
    lFieldLinkEd.Free;
  end;

end;