Hi,
I have Picking registration form ,I have a customized field like “Sales”,I want to set this field as mandatory for some condition and not mandatory for some condition.
I have added the code in wmsorder ds in active method of wmsorderregisteration form,but I facing pblm in picking registration grid like not satisfied condition “inventTable.Salesinvt == NoYes::No” also set as mandatory .Can anyone tell me to solve the pblm.
In Active method of Wmsorder datasource in wmsorderregisteration form.
select inventTable where inventTable.ItemId == WMSOrderTrans.itemId;
if(inventTable.Salesinvt == NoYes::Yes) //Customized field “Salesinvt” in inventtable
{
WMSOrderTrans_ds.object(fieldNum(WMSOrderTrans, Sales)).mandatory(true); //customized field “Sales” in wmsordertrans
}
else
{
WMSOrderTrans_ds.object(fieldNum(WMSOrderTrans, Sales)).mandatory(false);
WMSOrderTrans_ds.object(fieldNum(WMSOrderTrans, Sales)).allowEdit(false);
}