Skip to main content

Posts

Showing posts from February, 2012

Refresh DataSource and retain position

This post has been copied from  http://devexpp.blogspot.com/2012/02/refresh-datasource-and-retain-position.html Refresh a DataSource is a very common task to Dynamics AX developers, as you'll most likely perform changes on a record and have to present it to the user, on a form . The most commonly used method to refresh the DataSource to make a form show what you have changed on a record is the research  method. The only problem is that the  research  method doesn't retain the record that was selected, it positions the DataSource on the first record of the result, causing the user to see another record. To resolve this matter, the research method, only in Dynamics AX 2009, has a boolean parameter, retainPosition. Now if you call it by passing true to it, it will sure retain the position of the selected record after the refresh, right? Wrong... This should only work when your form has DataSources linked by Inner Joins in it, what mea...