web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Refresh caller datasource in the list page AX 2012

Shankar Das Profile Picture Shankar Das 205
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.


FormRun callerForm;

callerForm = element.args().caller();

callerForm.dataSource().refresh();
callerForm.dataSource().reread();
callerForm.dataSource().research();

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.



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.

Comments

*This post is locked for comments