REFRESH CALLER FORM DATASOURCE FROM A CLASS IN D365FO/AX7.
Please check the below code.
private static void main(Args _args)
{
Test testTable;
TestClass testClass;
FormDataSource formDs;
int position;
;
if (_args && _args.dataset() == tableNum(Test))
{
testTable = _args.record();
}
testClass = new TestClass();
formDs = FormDataUtil::getFormDataSource(testTable);
//formDs = _args.record().dataSource();
testClass.checkStage(testTable, testmethod);
if (testTable.RecId && formDs)
{
position = formDs.getPosition();
formDs.research();
formDs.setPosition(position);
}
}
Keep Daxing!!
No comments:
Post a Comment