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