Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Range issue in AOT query

$
0
0

Hi All, 

I have a data entity with data source as view. 

The data source of the view is AOT Query. This query having table GeneralJournalEntry. 

The query having range as AccountingDate. 

We are giving range like this format with the hard code.

Range : "10/1/2021"+'..'+"10/31/2021"; - with this range of hardcode getting the correct results. 

Customization: 

Created custom class and one method 

this method return the same message.   Example 

class GetQueryRangeUtil
{
[QueryRangeFunctionAttribute()]
public static str CalendarDateRange()
{
str result;
TransDate fromDate,toDate;

fromDate = FiscalCalenderStartDate;
toDate = CurrentDate
SysQueryRangeUtil::dateRange(fromDate, toDate);

return result;
}
}

Given value of range in AOT Query. 

(GetQueryRangeUtil::CalendarDateRange()) - with this did not get the results. 

Note:  The same  "10/1/2021"+'..'+"10/31/2021" values given in method as result getting the expecting results. 

Need the same range("10/1/2021"+'..'+"10/31/2021") as runtime. 

Can you please guide me how can i utilize the query range. 

Thanks in advance. 


Viewing all articles
Browse latest Browse all 175888

Trending Articles