Example of executeQuery in axapta x++ language
public void executeQuery()
{
QueryBuildDataSource qbds_test_Emp_Travel;
;
qbds_test_Emp_Travel = this.query().dataSourceTable( tablenum(test_Emp_Travel) );
qbds_test_Emp_Travel.addOrderByField(fieldnum(test_Emp_Travel, SrNo),SortOrder::Descending);
super();
}