Specifies the fields that are linked between two tables using the. This property is only available for XML items that have a table as their data source.
The following syntax shows the LinkFields property.
This property works in combination with theand the .
The property sets a filter on the table that is the data source for the XML item. The filter selects only those records that contain the same <field> value in source table as the <reference field> value from the table specified in.
For example, you have defined two XML items—one based on the Customer table that contains a list of customers and one based on the Sales Header table that contains a record of each sales order that has been made.
In the Customer table, the primary key is the customer number and is stored in the No. field. In the Sales Header table that contains the sales data, each record contains this customer number as a foreign key in the field called Sell-to Customer No.
Setting theof the second XML item to point to the Customer table and setting the Linkfields property of the first XML item to point to the Sell-to Customer No. field places a filter on the records in the Customer table. This means that only those records in the Sales Header table that refer to the current customer are selected.
The same result can be obtained by placing this C/AL statement in theof the child data item.
SETRANGE("Sell-to Customer No.",Customer."No.");