Plataan - Microsoft Dynamics - Learning & Competence Management Vincent Bellefroid Koen Stox Steven Renders Conny Schuddinck Steffie Alexiou
A blog about Microsoft Dynamics
Home Archives Subscribe Plataan website

« SQL Server 2008 R2 is here ! | Main | Printing Reports in Dynamics NAV 2009 »

28/04/2010

Linking parts on a Page: using the ProviderID property

A question I sometimes get asked when I deliver a Dynamics NAV 2009 development training is: Is it still possible to link a part to another part on a page, like you can do with two subforms on a form?

The answer is: Yes you can. There's a property that you can use to connect different parts on a page: the ProviderID property.

Example:

Lets create a new List Page for Salespersons. And on this Page let's also show the customers for each salesperson and the comments for each customer.

  1. Start by creating a new Page, Page Type List and Source Table: Salesperson/Purchaser.
  2. Add a Part to the Page and link it to Page 22, Customer List.
  3. In the SubFormLink property of the Part, link the Customer to the Salesperson: Salesperson Code=FIELD(Code)
  4. Remember the value of the property ID for the part. For example: 1000000004
  5. Add another part to the Page and link it to Page 125, Comment List.
  6. Then, go to the properties of this part and type the value 1000000004 in the property: ProviderID.
  7. Now, you can go into the SubFormLink property of this part, and you can connect it to the Customer List part: Table Name=FILTER(Customer),No.=FIELD(No.)
  8. And voila, you're ready. Save, compile and run you page:

Copy the Example SalesPersonsCustomersComments.txt:

OBJECT Page 59000 Test SalesPersons

{

OBJECT-PROPERTIES

{

Date=28/04/10;

Time=16:24:18;

Modified=Yes;

Version List=;

}

PROPERTIES

{

Editable=No;

SourceTable=Table13;

PageType=List;

}

CONTROLS

{

{ 1000000000;;Container;

CaptionML=ENU=ContentArea;

ContainerType=ContentArea }

 

{ 1000000001;1;Group ;

GroupType=Repeater }

 

{ 1000000002;2;Field ;

SourceExpr=Code }

 

{ 1000000003;2;Field ;

SourceExpr=Name }

 

{ 1000000004;1;Part ;

SubFormLink=Salesperson Code=FIELD(Code);

PagePartID=Page22 }

 

{ 1000000005;1;Part ;

SubFormLink=Table Name=FILTER(Customer),

No.=FIELD(No.);

PagePartID=Page125;

ProviderID=1000000004 }

 

}

CODE

{

 

BEGIN

END.

}

}

Comments

The comments to this entry are closed.

October 2011

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Plataan Community

Visit us on LinkedIn Visit us on Facebook Visit us on Twitter