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 :
Microsoft Dynamics AX (Archived)

Where does AX performs the sales orders summary update?

(0) ShareShare
ReportReport
Posted on by 427

Hello everyone,

In Accounts receivable - Periodic - Sales update - Invoice, in the other tab, there a dropdown list which allows the invoices to group orders in a certain way, by invoice account for example.

I have traced and used Trace Parser to try to figure out how the inner workings perform this grouping, with no result. There's a lot going on for sure in the FormLetter***** class world!

We want to integrate a customize field in SalesTable to group the orders by InvoiceAccount+CustomField instead of just InvoiceAccount so instead of creating one invoice line for each order from a customer, we would create one line per project code (the custom field) and group all orders on this line.

In this thread, there's a suggestion to use salesFormLetter.chooseLinesQuery(queryRun):

https://community.dynamics.com/ax/f/33/p/106550/208931

But I failed to see how this work.

Thanks for any pointer or hint,

Eric

AX 2012 - R3 - CU8

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Thomas Vogt Poulsen Profile Picture
    345 on at
    RE: Where does AX performs the sales orders summary update?

    Without going into to too much technical stuff, mostly because I have not tried it my self, I would guide you to the classes SalesSummary (SalesPurchSummary) and SalesPurchSummaryModel. This is where all the interesting thing happens.

    For example the SalesPurchSummaryModel.queryBuild() is where the query is modified to use the selected fields in a Order By statements making the orders appear in the current order.

    In SalesPurchSummaryModel_Account.addRangesQuery() the selected fields are ranges to the query and in SalesPurchSummaryModel_Model.createNewJournal() I believe that the decision whether or not to start a new summary order is done.

    In SalesFormLetterParmData the summary classes are called through SalesFormLetterParmData.reArrangeQueryRun().

    This is just a guide and you should spend some time debugging the code to fully understand how it works.

  • Arkadia2 Profile Picture
    427 on at
    RE: Where does AX performs the sales orders summary update?

    Hello Thomas,

    Thanks for replying! Sorry for the late reply, I'm just back from vacations, I will take a look at the classes you suggest tomorrow or Friday and update this thread.

    Regards,

    Eric

  • Arkadia2 Profile Picture
    427 on at
    RE: Where does AX performs the sales orders summary update?

    Looked up the many SalesPurchXXXXXXX classes and I did not felt comfortable with digging in the framework, I think too many class and enum (AccountOrder for example) have to be customized.

    We decided to use a separate menu item button in the SalesEditLines form which calls a customized class which isolate and invoices the clients who must have their invoices grouped by project. The SalesEditLines form can be used for the regular invoicing.

    Thanks for the pointer

    Eric

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans