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

Community site session details

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

Dynamic query in XDS policy in D365F&O

(0) ShareShare
ReportReport
Posted on by 529
Dear team,
 
Can you please let me know is it possible to use  dynamic query in XDS policy.
 
If yes, please let me know the steps please. As customer has asked to used dynamic query not AOT Query.
 
Thanks in advance.
Categories:
I have the same question (0)
  • CU05031448-0 Profile Picture
    529 on at
    Dynamic query in XDS policy in D365F&O
    Hi Andre, I mean to say customer not want to hardcore the value in query range.
    That's why I am asking about dynamic query.
     
    Is any alternative solution instead of hardcode in AOT Query range?
     
    Kindly elaborate pls.
     
    Thanks in advance 
  • Sohaib Cheema Profile Picture
    48,574 User Group Leader on at
    Dynamic query in XDS policy in D365F&O
    Regarding your second question: No, you cannot change the queryBuildDataSource or its ranges using X++ at runtime. The query must be defined as a physical AOT query. The only reason the behavior changes is because it’s joined with a custom table, and that custom table enforces the ranges on the query.
    The same custom table is used for the front-end entry (setup). 
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    298,893 Super User 2025 Season 2 on at
    Dynamic query in XDS policy in D365F&O
    Hi,
     
    What exactly do you mean by "Dynamics query not AOT Query"? XDS can work with AOT Queries only. There is e.g., no option to configure a query and XDS policy from within the application. 

    In case you need a link between e.g. a warehouse and a user, then you will need to have a table where you can setup the link. Anyway, it requires a customization. See also some of the examples I shared on my blog: Extensible Data Security examples for Microsoft Dynamics
  • CU05031448-0 Profile Picture
    529 on at
    Dynamic query in XDS policy in D365F&O
    Thanks Sohaib for the reply.
     
    Can you please provide me the screenshot for better understanding as you suggested.
     
    I have one more query ***
     
    Can I write code like 
    Query build data source to add data source and put range.
     
    Can I use this query in XDS? Is it possible?
     
    Thanks in advance.
  • Suggested answer
    Sohaib Cheema Profile Picture
    48,574 User Group Leader on at
    Dynamic query in XDS policy in D365F&O
    Yes, it is possible by joining your XDS query to a Table XYZ(which would be your custom table). Table XYZ would also have a form (Form XYZ) that allows you to add or remove values anytime through the front-end UI. This approach makes your XDS query as flexible as you need it to be.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,317

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 918 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 656 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans