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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

C# How to get all Customers into DataTable with specified CreditMax using User-Defined Query or Dynamic Query?

(0) ShareShare
ReportReport
Posted on by

I'm looking to load customer data into DataTable in C# by using User-Defined Query or Dynamic Query.. technet offers examples here:

https://technet.microsoft.com/en-us/library/gg847959.aspx

1. However for User-Defined Query.. how do I specify for example the CreditMax parameter for CustTable? (I'd like to grab all customers with CreditMax of X into a datatable)

2. Dynamic Query - how do I create a query in X++ by creating a class that extends the AifQueryBuilder class? It seems that the Dynamic Query example is missing a lot of things to get it fully working.

Code examples for either one would be much appreciated! Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    AOT > Classes > AifQueryBuilder > Right click > Add-ins > Type hierarchy browser will give you all standard implementation of such query. You do not need an example in the documentation, because the examples are already in the application. Like the one you want is CustAccountQueryBuilder* and you need to expand the parameters / query in case you want to have additional filters.

  • Verified answer
    Community Member Profile Picture
    on at

    Thanks Vilmos! I found this perfect walkthrough.. this is the level of hand holding I need!

    shashidotnet.wordpress.com/.../walkthrough-calling-the-query-service-with-a-dynamics-query-ax-2012

    https://community.dynamics.com/ax/b/shashisaxblog/archive/2013/01/15/walkthrough-calling-the-query-service-with-a-dynamic-query-ax-2012

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans