Friday, December 23, 2016
DIFFERENCE BETWEEN REFRESH(),REREAD(),RESEARCH() & EXECUTEQUERY() :DYNAMICS AX 2012 REFRESH AND REREAD
1. Refresh
This method basically refreshes the data displayed in the form controls
with whatever is stored in the form cache for that particular datasource
record. Calling refresh () method will NOT reread the record from the database.
So if changes happened to the record in another process, these will not be
shown after executing refresh ().
2. refreshEx
This method should be used sparingly, in cases where multiple rows from the
grid are updated, resulting in changes in their display Options, as an example.
So you should avoid using it as a replacement for refresh (), since they
actually have completely different implementations in the kernel.
3. Reread
Calling reread () will query the database and re-read the current record
contents into the datasource form cache. This will not display the changes on
the form until a redraw of the grid contents happens
4. Research
Calling research() will rerun the existing form query against the database,
therefore updating the list with new/removed records as well as updating all
existing rows. This will honor any existing filters and sorting on the form
that were set by the user.
5. Execute Query
Calling executeQuery () will also rerun the query and update/add/delete the
rows in the grid. The difference in behavior from research is described below.
ExecuteQuery should be used if you have modified the query in your code and
need to refresh the form to display the data based on the updated query.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment