get recid in grid when tick checkbox

i have a grid, in that grid i have a check box. how do i get the recid from the grid when i tick the check box?

There are several ways to do it. You can either override the modified method on the datasource field, or the modified method on the field in the grid.

Let’s say the checkbox is on the InventTable, then in the modified method you would have a line:

info(strfmt(“RecId: %1”, inventTable.recId));

If it’s a new record, remember it won’t have a recId until it’s been saved.