Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

AX 2012 R3. SysQueryForm performance. Unnecessary operations.

Posted on by 2,983

We have this performance issue in an AX 2012 R3 environment, where functionality that uses the "SysQueryForm" Form takes long time to build.

For example the "select" button in the Sales Invoice Posting builds a SysQueryForm with 4 datasource tables, and it takes time to build.

Looking throught the standard code, we found that the problem was in the Form SysQueryForm "queryLoad" method. There is this code:

sysQueryForm.buildAggregate(aggregate);
sysQueryForm.buildGroupBy(groupBy);
sysQueryForm.buildHaving(having);

Afther reading this blog post: http://daxfishing.blogspot.com.es/2012/04/aggregate-group-by-and-having-functions.html we found that there is new functionality in AX 2012, that enables the user to use group by and aggregate tabs in SysQueryForm.

My question is, is it neccesary for standard AX 2012 to sysQueryForm.buildAggregate(aggregate); when the Aggregate tab is not enabled?

We modified the queryload() method like this, and now our selection performance is much better:

if (AggregateTab.visible()) //Performance improvement
     sysQueryForm.buildAggregate(aggregate);
if (GroupByTab.visible())
     sysQueryForm.buildGroupBy(groupBy);
if (HavingTab.visible())
     sysQueryForm.buildHaving(having);

Any thoughts?

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans