Monday, February 27, 2023

getPosition and setPosition method in X++ | D365 F&0 | Dynamics 365 Finance and Operation

 Problem statement:

In a form, where a user can select a record from middle of the grid, hit a button in that runs some logic in a class, and all that works fine but cursor does not stay at the same record but goes to the top of the grid.


Solution:

int position;
position = tableName.getPosition();
//Make your logic here like call class method tableName_ds.research(true); tableName.setPosition(position);

No comments: