Hi,
So i'm trying to do multi select on dialog field. Below is what i did. The multi- select is working, and i can see that i filled 2 invoices for example but when I pass the contract to the service class, i can see the dialog has Invoice1 but Invoice2 is corrupted so if it's name was CIV-000001 I see it in the debug as CIV
Also i noticed that addLookupField is not working, it gives me all fields not only the ones i specified.
Here's what i did:
public void postRun()
{
super();
register overrides for form control events
field1.registerOverrideMethod(methodstr(FormStringControl, Lookup),
methodstr(InvoiceUIBuilder, lookUpfield1), this);
}
public void lookUpfield1(FormStringControl _control)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(CustInvoiceJour), _control);
Query query = new Query ();
query.addDataSource(tableNum(CustInvoiceJour)).addRange(fieldNum(CustInvoiceJour, flag)).value(enum2Str(NoYes::No));
// Add fields
sysTableLookup.addLookupfield(fieldNum(CustInvoiceJour, InvoiceId));
sysTableLookup.addLookupfield(fieldNum(CustInvoiceJour, InvoiceDate));
container con;
SysLookupMultiSelectGrid::lookup(query,_control,_control,_control,con);
// Run lookup
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}