Hi All,
I have a piece of code in my CalcPerUIBuilder class. The compilation is error free but at runtime I am getting eror due to the code highlighted in red.
The same code works excellently in AX2012 but here in D365 (AX7) I get an error due to the conversion from FormStringControl to DialogField.
Below is the sample code:-
public void postBuild()
{
DialogField dlgTypeId;
FormStringControl typeIdControl;
CalcPerContract calcPerContract;
super();
calcPerContract = this.dataContractObject();
dlgTypeId = this.bindInfo().getDialogField(calculationPeriodicContract,methodStr(CalcPerContract,parmTypeIDMatch));
typeIdControl = dlgTypeID.control();
typeIdControl.registerOverrideMethod(methodStr(FormStringControl,modified), methodStr(CalcPerUIBuilder,typeIdModified),this);
}