When we are working on List Page objects in Dynamics AX 2012, we found that methods cannot be added/modified in list page form. We have to work on the corresponding ListPageInteraction class.
Most of the time, we have to get the FormRun object and FormDataSource for different event inside the list page, the following coding can help to get these object form ListPageInteraction class.
Most of the time, we have to get the FormRun object and FormDataSource for different event inside the list page, the following coding can help to get these object form ListPageInteraction class.
ListPage listPage = this.ListPage();
Common common = listPage.activeRecord([DataSourceName]);
FormDataSource fds;
if (common.isFromDataSource())
{
fds = common.dataSource();
fds.formRun().control(fds.formRun().controlId([FormControlName])).userPromptText('New Description');
}
No comments:
Post a Comment