Hossain Chowdhury
Hossain Chowdhury

Reputation: 21

Listpage calling details/listpage page

I have a Listpage1 (having custtable field custno, custname etc) calling another listpage 2.

Listpage2 two will show Custdetails table, and will bring up all the records having custno from the calling listpage 1.

For EP listpage2 will be replaced by the User control. All navigation works fine now apart from the fact that the details listpage and user control on the EP shows all the records at the moment.

How can I pass the custno and filter the details page using custno?

Upvotes: 1

Views: 410

Answers (1)

Maxim Lazarev
Maxim Lazarev

Reputation: 1254

The best way to achieve this is to use Dynalink.

Here is a good example: http://www.axaptapedia.com/Tutorial_Form_Dynalink

Dynalink generates links between tables. Contains information regarding a relation (limitation) to an external record. When the query is run, this information is converted to additional entries in the WHERE clause of the query SQL statement. Can only exist on the parent data source of a query. The function is used by forms, when two data sources are synchronized. Then the child data source will contain a dynalink or dynalinks to the parent data source. The function is used even if the two data sources are placed in two different forms but are still synchronized.

Here is an example of Dynalink, place it in init method of master datasource (datasource for listPage1):

this.query().dataSourceTable(tableNum(CustTable)).addDynalink(
    fieldNum(CustTable, AccountNum),
    CustDetails,
    fieldNum(CustDetails, AccountNum));

Where first argument is key field in parent datasource, second argument is child table, and third is foreign key on that table.

Upvotes: 1

Related Questions