Showing posts with label Differentiate Refresh. Show all posts
Showing posts with label Differentiate Refresh. Show all posts

Differentiate Refresh, Reread, Research and Executequery

 


What is the Difference?



Refresh

  • refresh will not reread the record from the database.  It basically just refreshes the screen with whatever is stored in the form cache.
Reread
  • reread () will only re-read the CURRENT record from the DB so you should not use it to refresh the form data if you have added/removed records.  It’s often used if you change some values in the current record in some code, and commit them to the database using .update() on the table, instead of through the form data source.  In this case, .reread () will make those changes appear on the form.
ReSearch
  • research() will rerun the existing form query against the data source, therefore updating the list with new/removed records as well as updating existing ones.  This will honor any existing filters and sorting on the form.
ExecuteQuery
  • executeQuery () is another useful one.  It should be used if you have modified the query in your code and need to refresh the form.  It’s like research() except it takes query changes into account.

Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...