Refresh caller datasource in the list page AX 2012
Views (8)
Today I am going to share with you sample code for updating the caller datasource on list page action menu item. We normally refresh the caller data source on a normal form like this way.
Thanks to read the post and hope that will help you in refresh the caller data source both for list page and normal form.
In case of a list page how would you get the grid to refresh since the list page does not allow any override methods, because it uses Interaction Class. However, if I am going to use an action menu item. Code sample provided bellow is useful for this purpose.
FormRun callerForm;
callerForm = element.args().caller();
callerForm.dataSource().refresh();
callerForm.dataSource().reread();
callerForm.dataSource().research();
void main(Args _args)
{
FormDataSource callerDataSource;
callerDataSource = _args.record().dataSource();
callerDataSource.refresh();
callerDataSource.reread();
callerDataSource.research(true);
}
Thanks to read the post and hope that will help you in refresh the caller data source both for list page and normal form.
This was originally posted here.

Like
Report
*This post is locked for comments