Differences in Form Datasource Methods for Refreshing Data in Dynamics AX
Recently, I had been working on some rather complex customizations to a form in Dynamics AX, and found myself getting bogged down in refreshing the data on the form. There are many different ways to refresh the data, but each can get the information from different places (form cache, database, etc.). For what I was doing, I did not want to use the element.task() functionality. More information on this can be found here on the Microsoft Developer Network: https://msdn.microsoft.com/en-us/library/hh812104.aspx).
I ended up using the old tried and true datasource_ds methods to control the functionality I needed. I found that I needed a bit of a refresher to remember exactly where each call goes to get the data. The following article and tutorial is extremely helpful in explaining common usage of the four datasource methods: Tutorial: refresh, reread, research, executeQuery - which one to use?
If you are not familiar with the different calls, this is a great article explaining how each of the calls works, and where it retrieves the information. Also, if you ARE familiar with the calls it never hurts to have a refresher so you use the right method at the right time. Our development team uses this information often and we've found its the best source explaining the exact differences.