Hi everyone, I'm new to Axapta, and I need to modify a form. I need the form ProjSalesPriceHour to filter the records shown. As I understand, I have to modify the init() method, from the datasource of the form.
The query I want to use is:
SELECT *
FROM PROJHOURSALESPRICE PHS, PROJTABLE P
WHERE P.PROJID = PHS.PROJID AND P.GERENTECUENTA = '562'
GERENTECUENTA is the value of the employee ID of a manager asigned to a
project. I´m trying to compare the value stored in the ProjTable with the
value of the Employee ID of the user currently in session.
How should I write my query using the Query, QueryBuildDataSource and
QueryRange form?
Where can I get the API to learn this myself, or a good tutorial? Thanks a
lot again. I´d appreciate a lot your help.
0
Comments
http://insidedynamicsax.blogspot.com/2007/09/form-visual-designer-and-report-visual.html
see the eg below
static void SelectCustomerQuery(Args _args)
{
Query query;
QueryBuildDataSource queryBuildDatasource;
QueryBuildRange queryBuildRange;
QueryRun queryRun;
Counter recordsFound;
;
query = new Query();
queryBuildDataSource =
query.addDataSource(tableNum(CustTable));
queryBuildDataSource.addSortField(fieldNum(CustTable,
Name));
queryBuildRange =
queryBuildDataSource.addRange(fieldNum(CustTable,
Country));
queryRun = new QueryRun(query);
Vinoth Kumar.J