Hi all,
I'm adding a multi select drop down field to the VendTable form. I've created a extension class to create the drop down;
[ExtensionOf(formStr(VendTable))]
final class TestVendTable_Extension
{
public SysLookupMultiSelectCtrl logisticsTradeTypeCtrl;
void init()
{
next init();
logisticsTradeTypeCtrl = SysLookupMultiSelectCtrl::construct(this,
LogisticsTradeType,
queryStr(TestLogisticsTradeTypeQry),
true,
[tableNum(TestLogisticsTradeType),
fieldNum(TestLogisticsTradeType, TestLogisticsTradeTypeId)]);
}
}
I need to access the property from a DataSource extension in order to populate the control;
[ExtensionOf(formDataSourcestr(VendTable, VendTable))]
final class TestVendTableDataSource_Extension
{
public int active()
{
VendTable vt = this.cursor();
if (vt.LogisticsTradeTypeCon)
{
// I can't access this variable
logisticsTradeTypeCtrl.set(vt.LogisticsTradeTypeCon);
}
else
{
logisticsTradeTypeCtrl.set(conNull());
}
int ret = next active();
return ret;
}
}
However, I can't access "logisticsTradeTypeCtrl" from within the active datasource method.
Have I gone about this in the correct way, feels like I haven't :)
Any help appreciated!
Regards, Jason