Hi all,
I want to show item name into look up .
in ax2009 ItemName fields is there but in ax 2012 its removed and added into method e.g name()
my requirement is i need to fetch name() method value as a lookup along with item id.
note : name() is static method.
at the time of compiling look up there is no error ,but while running look up its throwing an error “Type void is not supported in this type of lookups” ,
the code which i written as below.
public void lookup()
{
//super();
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), this);
sysTableLookup.addLookupField(fieldNum(InventTable, ItemId),true);
sysTableLookup.addLookupMethod(‘name’);
sysTableLookup.addLookupfield(fieldNum(InventTable,ItemType),true);
sysTableLookup.addLookupfield(fieldNum(InventTable,rmsInsurancePercentage),true);
queryBuildDataSource = query.addDataSource(tableNum(InventTable));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(InventTable, rmsInsurancePercentage),true);
queryBuildRange.value(’>0’);
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
It will appreciated if some can help me to resolved this.