In Dynamics D365 FFO, I would like to set the value in VALIDATE chain of command method.
My Code:
[ExtensionOf(formDataFieldStr(MyFORM,MyDataSource, MyControl))]
final class MyFORM_MyDataSource_MyControl_Extension
{
public boolean validate()
{
boolean ret;
FormDataObject formDataObject;
FormDataSource formDataSource;
MyTable currentMyTable;
MyEDTField_CurrentRecord myEDTField_CurrentFIELD;
ret = next validate();
formDataObject = any2Object(this) as FormDataObject;
formDataSource = formDataObject.datasource();
currentMyTable = formDataSource.cursor();
myEDTField_CurrentFIELD = currentMyTable.MyField;
if("MyLogic.... - myEDTField_CurrentFIELD ")
{
ret = checkFailed("KO");
*// I WOULD LIKE TO SET BLANK VALUE FIELD HERE*
}
return ret;
}
Is it possible to call and set the value field in Chain of command method Valitdate. If validation is KO, I need to set null value.
Thanks