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');

Comments

Popular posts from this blog

D365: SSRS Report Development/ Customization

D365: X++ code to add custom lookup on worker to show specific workers team workers only

Error message when you log on to a Microsoft Dynamics AX 4.0 client: "You are not a recognized user of Microsoft Dynamics AX"