Hi All,
In this blog will learn how to add range method same as SysQueryRangeUtil methods and apply on view.
Requirement - Add range in view to take only records up to last month ( Today() – days of current date) i.e equal to up to last month transactions
x++ Code
{
[QueryRangeFunction]
public static str lessthanLastMonth()
{
int days ;
utcdatetime currentDateTime;
currentDateTime = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::getSystemDateTime(), DateTimeUtil::getUserPreferredTimeZone());
days = DateTimeUtil::day(currentDateTime)-1;
return SysQueryRangeUtil::lessThanDate(-days);
}
}
Add method name in range property of view.
Thats It !!