How to work with TempDB on the form

D365
I need to add TempDB as a datasource to the SalesTable form that for each record will show relevant info from another company. I’ve added the table population to init() of the DS and linked the buffer. All is working fine.
My concern is that SalesTable is rather complex with a lot of operations that the user can perform against the records. That are even hard all to predict/identify. How can I make sure that the records in TempDB are always correctly added/ updated. Do I need to repopulate the TempDB in executeQuery ? Is it enough? Any other, better , approaches?
Thank you

Yes, repopulating TempDB in executeQuery() is a smart and safe approach. You can also use linkActive() to refresh data only when users switch records.

Just using init() won’t be enough, especially with so many user actions. So a mix of executeQuery() and linkActive() usually keeps things in sync without overloading the system.