Hi Friends ,
Today we are going to see how to restrict combo Box Controls in Ax 2012
public FormComboboxControl removeInactiveInvoiceTypes(FormComboboxControl _formComboboxControl)
{
FormComboboxControl formComboboxControl;
DictEnum dictEnum;
MInvoiceTypeTable invoiceTypeTable ;
;
formComboboxControl = _formComboboxControl;
dictEnum = new DictEnum(enumNum(BilInvoiceTypes));
numberOfInvoiceTypes = dictEnum.values() - 1;
while select InvoiceType from invoiceTypeTable
where invoiceTypeTable.UseForFreeTextInvoice == noYes::No
{
formComboboxControl.delete(dictEnum.value2Label(invoiceTypeTable.InvoiceType));
numberOfInvoiceTypes--;
}
return formComboboxControl;
}
In the run Method element.removeInactiveInvoiceTypes(InvoiceType);
Vivek Chirumamilla