Hi All,
In SalesCreateOrder form, there are fieldA and fieldB which are from SalesTable and these fields are mandatory at table level. I want to set FieldA and FieldB as non-mandatory based on some condition. I have written the code in ‘SalesPoolId’ modified method. Ax is executing the code yet the fieldA and fieldB are displayed as mandatory.
I have used following piece of code.
if (!SalesPool::find(salesTable.SalesPoolId).cnlWFJOrder)
{
Group1_cnlOrderSeasonId.mandatory(true);
Group1_cnlOrderTypeId.mandatory(true);
Group1_cnlOrderNatureId.mandatory(true);
}
else
{
Group1_cnlOrderSeasonId.mandatory(false);
Group1_cnlOrderTypeId.mandatory(false);
Group1_cnlOrderNatureId.mandatory(false);
}
How can I make those fields as non-mandatory ?
Thanks in advance.