Tutorial: refresh, reread, research, executeQuery - which one to use?
content copied from - http://kashperuk.blogspot.com/2010/03/tutorial-reread-refresh-research.html X++ developers seem to be having a lot of trouble with these 4 datasource methods, no matter how senior they are in AX. So I decided to make a small hands-on tutorial, demonstrating the common usage scenario for each of the methods. I have ordered the methods based on the impact on the rows being displayed in the grid. You can download the xpo with the tutorial on my SkyDrive . 1. Common mistakes Often, developers call 2 of the mentioned methods in the following order: formDataSource.refresh() formDataSource.research() or formDataSource.reread() formDataSource.research() or formDataSource.research() formDataSource.executeQuery() or formDataSource.research() formDataSource.refresh() / formDataSource.reread() All of these are wrong, or at least partially redundant. Hopefully, after reading the full post, there will be no questions as to why they are wrong. Leave a comment