Location Id look up
public void lookup(FormControl _formControl, str _filterStr)
{
//LogisticsLocation::locationLookup(_formControl, CustTable::find(ProjFundingSource::findCustAccount(projInvoiceTable.ProjInvoiceProjId).CustAccount).Party);
//super(_formControl, _filterStr);
QueryBuildDataSource queryBuildDataSource,queryBuildDataSource1;
Query query;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(LogisticsLocation), _formControl);
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(LogisticsLocation));
queryBuildDataSource = queryBuildDataSource.addDataSource(tableNum(DirPartyLocation));
queryBuildDataSource.joinMode(JoinMode::InnerJoin);
queryBuildDataSource.relations(true);
queryBuildDataSource.addRange(fieldNum(DirPartyLocation,Party)).value(queryValue(CustTable::find(ProjFundingSource::findCustAccount(projInvoiceTable.ProjInvoiceProjId).CustAccount).Party));
//queryBuildDataSource.addRange(fieldNum(DirPartyLocation,IsPostalAddress)).value(SysQuery::value(NoYes::Yes));
//if (_roleType != LogisticsLocationRoleType::None)
//{
queryBuildDataSource = queryBuildDataSource.addDataSource(tableNum(DirPartyLocationRole));
queryBuildDataSource.joinMode(JoinMode::InnerJoin);
queryBuildDataSource.relations(true);
queryBuildDataSource.addRange(fieldNum(DirPartyLocationRole,LocationRole)).value(SysQuery::valueNot(LogisticsLocationRoleType::None));//SysQuery::value(int642str(LogisticsLocationRole::findBytype(_roleType).RecId)));
//}
sysTableLookup.addLookupfield(fieldNum(LogisticsLocation, LocationId),true);
sysTableLookup.addLookupfield(fieldNum(LogisticsLocation, Description));
sysTableLookup.addLookupMethod(tableMethodStr(LogisticsLocation,postalAddress));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
public void lookup(FormControl _formControl, str _filterStr)
{
//LogisticsLocation::locationLookup(_formControl, CustTable::find(ProjFundingSource::findCustAccount(projInvoiceTable.ProjInvoiceProjId).CustAccount).Party);
//super(_formControl, _filterStr);
QueryBuildDataSource queryBuildDataSource,queryBuildDataSource1;
Query query;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(LogisticsLocation), _formControl);
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(LogisticsLocation));
queryBuildDataSource = queryBuildDataSource.addDataSource(tableNum(DirPartyLocation));
queryBuildDataSource.joinMode(JoinMode::InnerJoin);
queryBuildDataSource.relations(true);
queryBuildDataSource.addRange(fieldNum(DirPartyLocation,Party)).value(queryValue(CustTable::find(ProjFundingSource::findCustAccount(projInvoiceTable.ProjInvoiceProjId).CustAccount).Party));
//queryBuildDataSource.addRange(fieldNum(DirPartyLocation,IsPostalAddress)).value(SysQuery::value(NoYes::Yes));
//if (_roleType != LogisticsLocationRoleType::None)
//{
queryBuildDataSource = queryBuildDataSource.addDataSource(tableNum(DirPartyLocationRole));
queryBuildDataSource.joinMode(JoinMode::InnerJoin);
queryBuildDataSource.relations(true);
queryBuildDataSource.addRange(fieldNum(DirPartyLocationRole,LocationRole)).value(SysQuery::valueNot(LogisticsLocationRoleType::None));//SysQuery::value(int642str(LogisticsLocationRole::findBytype(_roleType).RecId)));
//}
sysTableLookup.addLookupfield(fieldNum(LogisticsLocation, LocationId),true);
sysTableLookup.addLookupfield(fieldNum(LogisticsLocation, Description));
sysTableLookup.addLookupMethod(tableMethodStr(LogisticsLocation,postalAddress));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment