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)

Should Cash flow forecast be including Invoiced sales orders or not?

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm struggling to get the Cash flow forecast to run within any decent time. I'm running it in batch, and it takes a very long time (>1 day) and ends up locking the LedgerCov table.

I've been looking in the code to see what the job does (LedgerCovTotal), and I have also seen that most of my time is spent updating sales orders.

The documentation here: https://docs.microsoft.com/en-us/dynamics365/unified-operations/financials/cash-bank-management/cash-flow-forecasting

says that "Sales orders that aren't yet invoiced, and that result in physical or financial sales." are considered. 

However, SalesTableType.updateLedgerCov() calls SalesTableType.mustCovBePlanned() to see if a given sales order should be processed. And mustCovBePlanned() returns true for all sales orders which have SalesStatus = Invoiced (I'm on Ax2009).

To me that looks like all historical sales orders, which are invoiced, are being processed every time the cash flow forecast is run (for Total). Since the processing of a sales order includes calculating totals and all types of amounts on the order, I'm beginnign to see where my time is getting lost. 

So returning to the statement in the documentation that sales orders which aren't invoiced are considered, I'm confused as to if those invoice sales orders are supposed to be processed or not? I realize the documentation link is for D365, so is it a possibility that this has changed since Ax2009?

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Should Cash flow forecast be including Invoiced sales orders or not?

    Hi,

    Does the cash flow calculation finish if you run it in a different demo/test system?

    If it is also slow there can you extract the cash flow relevant data with the help of the AX cubes?

    They make use of aggregated data and things should be much faster using them.

    Best regards,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: Should Cash flow forecast be including Invoiced sales orders or not?

    Q: Does the cash flow calculation finish if you run it in a different demo/test system?

    A: I'm running in a sandbox which is equivalent to our live system. I have two companies with a lot less transactions than the main company; Here I can execute in about 1 and 14 hours respectively. I have added some timing to the logs which shows me that 85-90% of the time is spent on updates to SalesTable and PurchTable (the updateLedgerCov() calls).

    Q: If it is also slow there can you extract the cash flow relevant data with the help of the AX cubes?

    A: Haven't looked at cubes. I'm interested right now in getting the cash flow forecast job to run.

    The problem seems to be that because Sales and Purchase orders with status Invoiced are always included, then over time, as the order count increases, the cash flow forecast job will take increasingly long time. This takes me back to the original question: The documentation link I posted states that orders not invoiced are included, while the code includes invoiced orders?

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Should Cash flow forecast be including Invoiced sales orders or not?

    Hello Mette,

    The cash flow forecast should include invoiced but unpaid and not invoiced transactions because you need to know how much money you either have to pay for purchases or how much money you will receive for sales.

    Do you always make a total calculation or only one for the new items?

    The new option should run much faster.

    Best regards,

    Ludwig

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