Senin, 29 Juni 2020

Lookup based on Fromdate Todate

public void lookup()
{
   
    Query                       query = new Query();
    QueryBuildDataSource        queryBuildDataSource;
    QueryBuildRange             queryBuildRange;
    SysTableLookup              sysTableLookup = SysTableLookup::newParameters(tableNum(CustPaymFee), This);
    ;
    //2daydate  = today();
    sysTableLookup.addLookupField(fieldNum(CustPaymFee, FeeId));
    sysTableLookup.addLookupField(fieldNum(CustPaymFee, Description));
    sysTableLookup.addLookupField(fieldNum(CustPaymFee, LedgerJournalType));
   
    queryBuildDataSource = query.addDataSource(tableNum(CustPaymFee));
    queryBuildDataSource.addRange(fieldNum(CustPaymFee, PSMFromdate)).value("<"+SysQuery::value(today()));
    //queryBuildRange.value('<='+SysQuery::value(today())); <= its not working
    queryBuildDataSource.addRange(fieldNum(CustPaymFee, PSMtodate)).value(">"+SysQuery::value(today()));
    //queryBuildRange.value('>='+SysQuery::value(today())); >= its not working
   
    sysTableLookup.parmQuery(query);
    // Perform lookup
    sysTableLookup.performFormLookup();
   
}

Tidak ada komentar:

Posting Komentar

Erorr CS1963 - An expression tree may not contain a dynamic operation.

Kali ini saya mendapatkan erorr dengan code CS1963, padahal sebelumnya saya sudah mendefinisikan 'var item in Model' di @foreach(var...