web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Query init method

(0) ShareShare
ReportReport
Posted on by 556
Hi,
 
What is something I can't do in AOT query that will force me to write code in init method of the query?
Is there like a specfic range that can't be done in AOT query where i need to write it by code? Or is there sth else that i will need to use init method for?
Categories:
I have the same question (0)
  • Suggested answer
    BlessyFreedaJ Profile Picture
    25 on at

    You don't need init() if your query only contains:
    Static data sources
    Fixed joins
    Static ranges
    Fixed sorting
    Static relations
     
    If the query definition is the same every time it runs, use the AOT. If it needs to change based on runtime conditions or user input, use the init() method.

    Thanks,
    Blessy
     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

     
  • DELDYN Profile Picture
    556 on at
    Hi,
     
    Can you please explain what do you mean by
    Static datasources,  ranges and relations?
     
    And what do you mean by Fixed joins and sorting?
     
    Just so that i understand if not the above then why use init.
     
     
    And for the 2nd part
    Can you show me code example where query might change based on runtime?
    And another example where it will change based on user input?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 508 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 453

#3
Shaluma Profile Picture

Shaluma 304

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans