Hi,
I have a form that inside contain a Grid, listing my records. I created a class that works from a button at the top of the form that processing something by first get the current record on the grid. However, problem arise when I want to refresh my form (also the grid), as I'm using this code :
internal final class My_ProcessToClear { static void main(Args _args) { MyTable myTable = _args.record(); . . . FormDataSource fds = _args.record().datasource(); fds.executeQuery(); fds.refresh(); } }
It looks that ExecuteQuery(), while get my updated data (since my process will update some fields in the form which contain 2 tables : header and detail), it will also change the pointer of the current record. Because right after this class executed, the form changed to display other record. Just to inform, form that code, MyTable is the header (example : recordNo. 5) so after the class, the header will show other record which is recordNo.1
Is there a way to point back to the current record ?
Thanks,
Yes, research method will be sufficient.
Thanks,
Girish S.
Hi Girish,
If I'm not mistaken, when using Research, we can eliminate the use of ExecuteQuery() and also Refresh(), is that true ? Which mean Research(true) only will be sufficient ?
Thanks
Hi Lars Volt,
Try calling fds.research(true) on your class to retain position selected of record.
Thanks,
Girish S.
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156