Saturday, July 14, 2012

How to add multiple range for table in axapta

On init method you can use code to add range following way.

 void init()  
 {  
  super();  
 qbrName = this.query().dataSourceTable(tablenum(InventDimCombination)).addRange( fieldnum(InventDimCombination,Name));  
  qbrName.status(RangeStatus::Hidden);  
 qbrItem = this.query().dataSourceTable(tablenum(InventDimCombination)).addRange( fieldnum(InventDimCombination,ItemId));  
 qbrItem.status(RangeStatus::Hidden);  
 }