Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Range issue in AOT query

(0) ShareShare
ReportReport
Posted on by 415

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. 

  • vaasu Profile Picture
    415 on at
    RE: Range issue in AOT query

    Hi Sahin,

    Thanks for your response. The version is 10.0.21.

  • ergun sahin Profile Picture
    8,816 Moderator on at
    RE: Range issue in AOT query

    result is empty. Can you share the whole code (or properly cleaned version)?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,217 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,978 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans