Query not value enum in D365


//Query not value field

QueryBuildRange qbrRecId;
qbrRecId = qbds1.addRange(fieldNum(HcmWorker, RecId  ));// add range
qbrRecId.value(SysQuery::valueNot("22565420979"));//22565420979 is RecId of worker;
  
//QueryBuildDatasource add range not equal to ENUM value

QueryBuildRange qbrStatus;
qbrStatus = qbds1.addRange(fieldNum(PerdiemHeader, Status));// add range
qbrStatus.value(SysQuery::valueNot(enum2str(PerdiemStatus::Rejected)));

it works for one range ,but what if i want add multiple value to range like this :

QueryBuildDataSource qbds;              
qbds.addRange(fieldNum(HcmWorker, RecId ).value(SysQuery::valueNot("22565420979"));
qbds.addRange(fieldNum(PerdiemHeader,Status).value(SysQuery::valueNot(enum2str(PerdiemStatus::Rejected)));

Comments

Popular posts from this blog

SSRS Report using Controller , Contract and RDP classes in D365

Exporting data to Excel through X++ code

COC for Form level method

How to pass the parameter from one form to another in Dynamic365

Multi Select Lookup in SSRS Report in D365