Subform Linking from Subform to Subform

eskayeskay Member Posts: 11
Hello there,

is it possible to realize a relation from a subform line to new subforms related not to the
headerform.

through the properties I can place a SubFormID / Subform Link which is related to the header
form.

Im my sample the prod order lines has a relation to prod. order routing line and prod. order component.

So I need to realize a view where I can step through the Prod. Order lines and see in the related
Subforms the according routing lines and components for each production step.

Is this possible?

Thanks
Siggi

Comments

  • annivasuannivasu Member Posts: 10
    Hi eskay,

    for Sub Form Link you can use following :
    Step 1. Set Main Header form TimeIntervel Property with 10
    Step 2. Now Create a function with Main Form Called MainForm1Function(Line1 record varibale Passing);

    MainForm1Function(Line1 : Record "Line 1");
    {
    Line2.SETRANGE(Field1,Line1.field1);
    Line2.SETRANGE(Field2,Line1.field2);
    Line2.SETRANGE(Field3,Line1.field3);
    CurrForm.SubSubForm.FORM.SETTABLEVIEW(Line2);
    }

    Step 3. Called fllowing lines in Main Form's OnTimer Trigger.
    Form - OnTimer()
    {
    IF NOT CurrForm.SubForm.FORM.IsSelectedLineChanged THEN
    EXIT;
    CurrForm.SubForm.FORM.GETRECORD(Line1);
    MainForm1Function(Line1);
    CurrForm.SubSubForm.FORM.UpdateForm;
    }
    Step 4. Set SubFormLink Property of SubSubForm with SubForm Fields.

    Hope above code will help you...
    all the best :)
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Your first subform should just include your second and third subform. That means you'll have one main form and one subform. This subform consists of one main form (list) and two subforms. You just need to set Width and Height of your first subform to a proper value.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.