<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is it possible to set the table relations at run time ? Where can I
> find the example ?
>
> Thanks.
>
> Kenneth.
If you are using the tables to be related in request data then
preferably to use Query class
and make relations at run time as in the code:
Query query =
new Query();
QueryBuildDatasource queryBuildDatasource = query.addDataSource
(tableNum(SalesTable));
QueryBuildDatasource queryBuildDatasource2 =
queryBuildDatasource.addDataSource(tableNum(SalesLine));
;
queryBuildDataSource2.relations(false);
queryBuildDataSource2.addLink(fieldnum(SalesTable,SalesId),
fieldnum(SalesLine, SalesId));
the result query looks like
"SELECT * FROM SalesTable JOIN * FROM SalesLine WHERE
SalesTable.SalesId = SalesLine.SalesId"
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

