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
Post a Comment