Monday, February 27, 2023

Record is selecting top when refreshing grid through button code through class | D365 F&0 | Dynamics 365 Finance and Operation | X++

Problem statement:

In a form, where a user can select a record from midle 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: