how to add Date ranges in DP class in d365 fo x++

  if(startDate || endDate)

        {

            utcdatetime _fromDate = DateTimeUtil::newDateTime(startDate,0);

            utcdatetime _toDate   = DateTimeUtil::newDateTime(endDate,86400);

            qbr = SysQuery::findOrCreateRange(qbdsSalesLine, fieldNum(salesLine, CreatedDateTime));

            range = SysQuery::range(_fromDate, _toDate);

            qbr.value(range);

        }

Comments

Popular posts from this blog

Get Current Worker data in d365 fo x++

Table Level Event Handler in d365 fo x++