Skip to main content

Posts

Showing posts with the label querybuilddatasource

How to restrict auto filter due to dynamic link in axapta form

If you have created a Form and it is automatically filtering your Datasource because of the Dynalinks which is created automatically and dynamically,To solve that issue you can use below code. Test_DS.query().dataSourceNo(1).clearDynalinks(); You can call code on init method of form. Other way you can use below. QueryBuildDatasource qbds; ; qbds = this.query().dataSourceTable(tablenum(MyTableName)); qbds.clearDynalinks();

Add tables to query build datasource in MSDAX

Add tables to query build datasource ,addlink,relation static void QBDSExample(Args _args) { Query query; QueryBuildDatasource datasource; ; query = new Query(); // Add purchtable main datasource datasource = query.addDataSource(tableNum(purchtable)); // Add child datasource "purchline" datasource = datasource.addDataSource(tableNum(purchline)); // Set the join mode datasource.joinMode(JoinMode::InnerJoin); datasource.relations(false); datasource.addLink(fieldNum(purchtable, purchid), fieldNum(purchline, purchid)); info(query.xml()); }