Thursday, April 3, 2014

OR condition in X++ Query Range

Adding OR condition in X++ query range

public void executeQuery()
{
    list list = new list(types::String);
    listenumerator listenumerator;
    query q;
    querybuilddatasource qbds;
    ;
    list.addEnd(SalesStatus::Delivered);
    list.addEnd(SalesStatus::Invoiced);
   
    qbds = this.query().dataSourceNo(1);
    listenumerator = list.getEnumerator();
    while(listenumerator.moveNext())
    {
        qbds.addRange(fieldnum(SalesTable,SalesStatus)).value(queryvalue(listenumerator.current()));
    }
    info(this.query().dataSourceNo(1).toString());
    super();
}

No comments:

Post a Comment