Adding relations among Table Using X++
Adding relations among tables if they don't exist at table level and adding range
QueryBuildDataSource qbds;
qbds = this.query().dataSourceTable(tableNum(SalesTable));
qbds.addLink(fieldNum(SalesLine, SalesId), fieldNum(SalesTable, SalesId));
//Adding range
qbds.addRange(fieldNum(RouteVersion,SalesId )).value('01');
QueryBuildDataSource qbds;
qbds = this.query().dataSourceTable(tableNum(SalesTable));
qbds.addLink(fieldNum(SalesLine, SalesId), fieldNum(SalesTable, SalesId));
//Adding range
qbds.addRange(fieldNum(RouteVersion,SalesId )).value('01');
Comments
Post a Comment