create a new row in table through dialog and automatically select it after dialog window is closed (Dynamics 365 F&O)

Hello,

It would be nice if someone could help me and share some ideas/code on how to automatically select the row in a table created from a dialog window. At the moment the code just updates the table and inserts the new row, but automatically selects the first row of the table.

Best regards,

Roberts