Skip to main content
Dynamics 365
  • 1 min read

Research method on X++ forms


In AX2009 if you call the research() method on a form passing true, the cursor position within a grid should be retained.  However, this is true only if the query created by the form uses inner joins.  Any outer joins, aggregations, temp tables, etc. cause the cursor to go to either the first or last record (depending upon the StartPosition property for that data source).  In 2009 if you want to keep the cursor position and use joins other than inner joins you have to keep track of the cursor position.  Code like the following will do this:

    int pos;

    super();

    pos = salesQuotationTable_ds.getPosition();
    salesQuotationTable_ds.research();
    salesQuotationTable_ds.setPosition(pos);

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.