X++

Dynamics AX 2012 R3- To exist or not, that is the question!

The advanced filter and query in Dynamics AX is a very powerful tool. Here you can search on most fields, and also add relations to the query.

You can open this advanced query screen from almost any AX screen, and the short-cut is “CTRL-F3”.

But there is one area that the advanced query screen is not handling. That is “Not-exists-join”. Let’s say I want a list of all the purchase orders that DON’T have purchase lines. The standard AX will not help you here. Often a developer must come inn and create a smart query or script to find this. With the introduction of attributes and retail categories, I see the need for this “not-Exists-join” feature to be able to create advanced queries.

I don’t accept this, because I want to empower the end-user to perform such queries. So here is my gift to the Dynamics AX ecosystem; NotExistsJoin directly on the advanced query screen:

Then I can look at the filtered purchase list page, and I only see purchase orders that DON’T have any purchase lines J

This will work allover dynamics AX, even on cue’s and on other query based functionality.

So what’s the trick? A few changes to the following two classes:

Let’s take the changes “one-by-one”, or you can download the code here : https://dynamicsax2012r3notexists.codeplex.com/

Then here is the last change to get a icon on not-exists join:

Have fun DAX’ing 😉

I appreciate that I can be a part of this worldwide blog community—as a consultant working from Norway, the blog lets me share more than 20 years of experience with Microsoft Dynamics 365. Along the way, I developed retail, PDA/RF, barcoding, master data, kitting and WMS-solutions for Dynamics. My blog focuses on my deepest interests and expertise: along with a 360 degree view of warehouse management topics, I welcome opportunities to dive into retail and intercompany supply chain automation, logistics, and production—everything that is moving around in a truly connected enterprise. As executive consultant on Dynamics 365, I specialize in strategic development and planning for corporate vertical solutions and works to build international networks that increase knowledge and understanding for Dynamics AX. As an advocate for both providers and customers, I'm committed to ensure that customers meet constantly changing needs, and I see community as key for increasing expertise.

5 comments on “Dynamics AX 2012 R3- To exist or not, that is the question!

  1. Nice post 🙂

    Like

  2. Kyle LeBarre

    I managed to do this same modification a few months ago and this is pretty much the same solution that I used. Been using it for a few months without any issues. Users can save their queries to their favorites and everything, too. I like the icon…nice touch 🙂

    Like

  3. Pedro Rodriguez

    Great!!! Thanks!

    Like

  4. Hi Kurt,

    Nice post! Will this work on R2 as well?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: