Hello Martin,
Thank you very much for your answers. I have created a new parmMethod for my new field in contract class like that:
[
DataMemberAttribute(),
SysOperationGroupMemberAttribute('Parameters'),
SysOperationDisplayOrderAttribute('4'),
SysOperationLabelAttribute(literalstr("@SYS54971")),
SysOperationHelpTextAttribute(literalstr("@SYS54971")),
SysOperationCtrlAllowEditAttribute_ICL(false),
SysOperationControlVisibilityAttribute(false)
]
public TransDate parmActivationDate(TransDate _activationDate = activationDate)
{
activationDate = _activationDate;
return activationDate;
}
I have pointed it as invisible by default.
Then I have added the following code to classDeclaration of my the class UIBuilder:
DialogField dlgActivationDate;
then to postbuild() method of UIBuilder:
dlgActivationDate = this.bindInfo().getDialogField(contract, methodStr(ProdCalculation_Contract_ICL, parmActivationDate));
if(contract.parmIsLaunchedFromBaseData() == IsLaunchedFromBaseData::IsLaunchedFromBaseData)
{
dlgActivationDate.visible(true);
dlgActivationDate.allowEdit(false);
}
The system throws error on the string:
dlgActivationDate.visible(true);
saying that dialogfield object isn't initialized.
What's wrong wth the code?
Thanks.