Lookup – exemplu

Lasă un comentariu

7 Ianuarie 2015 de liviustoica55


public
static
void lookupAccountCategory(FormStringControl _stringControl, str accountPlType)

{

MainAccountCategory mainAccountCategory;

SysTableLookup sysTableLookup = SysTableLookup::newParameters(mainAccountCategory.TableId, _stringControl);

Query query = new Query();

QueryBuildDataSource queryBuildDataSource = query.addDataSource(mainAccountCategory.TableId);

QueryBuildRange queryBuildRangeAccountType = queryBuildDataSource.addRange(fieldnum(MainAccountCategory, AccountType));

QueryBuildRange queryBuildRangeClosed = queryBuildDataSource.addRange(fieldnum(MainAccountCategory, Closed));

 

queryBuildDataSource.addSortField(fieldnum(MainAccountCategory, AccountCategory));

 

sysTableLookup.addLookupfield(fieldnum(MainAccountCategory, AccountCategory));

sysTableLookup.addLookupfield(fieldnum(MainAccountCategory, Description));

sysTableLookup.addLookupfield(fieldnum(MainAccountCategory, AccountType));

 

queryBuildRangeAccountType.value(SysQuery::value(DimensionLedgerAccCategoryAccountType::Blank) + ‘,’ + SysQuery::value(accountPlType));

queryBuildRangeClosed.value(SysQuery::value(NoYes::No));

 

sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

}

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s

%d blogeri au apreciat asta: