Hi guys, Today we see when I run execute query I don't want to change active record cursor position in ax 2012 X++.Refresh DataSource and retain to same position.
Here we have 2 ways Just check below.
Code 1: Here we use Get and Set methods.
Int position;
position = TestTable_ds.getPosition();
TestTable_ds.executeQuery();
TestTable_ds.setPosition(position);
Code 2: we can use Recid also. This is more efficient compared Code 1.
TestTable testTable;
testTable.RecId = TestTable.RecId;
TestTable_ds.executeQuery();
TestTable_ds.findRecord(testTable);
Keep Daxing!!
No comments:
Post a Comment