Hi,
I need to add items to combo box from a table field.
For eg: I want all the customer name from the CustTable to be added to the ComboBox in an user defined Form.
Hi,
I need to add items to combo box from a table field.
For eg: I want all the customer name from the CustTable to be added to the ComboBox in an user defined Form.
AX uses lookup forms for such things.
There are differences between versions of AX - which one do you use?
AX 2012
You can use code like this in your lookup method:
DirPartyLookupEntitiesFilter filter;
;
filter = DirPartyLookupEntitiesFilter::generateDirPartyLookupEntitiesFilter(
NoYes::No,
FilterStatus::Set);
DirUtility::namelookup(this, null, DirPartyType::None, null, true, filter);
Nevertheless don’t forget that names are not unique. If you want to use it for further processing, you should save the party ID, not just a name.