hi All,
we upgraded Ax from 2012 R1 to R3 recently, the kernel version is 6.3.164.0
When I tried to post multi sales orders that with same invoice account, I catch sql statement trace log, below statement using long query time and that cause our sales order invoicing performance very slow( on my instance, took above 26k query time for two sales orders, each order has 10-15 sales lines).
statement:
select sum(EndDisc), sum(InvoiceAmount), sum(SalesBalance), sum(SumMarkup), sum(SumTax) from custInvoiceJour
where custInvoiceJour.RefNum == RefNum::SalesOrder
notexists join custInvoiceSalesLink
where custInvoiceJour.SalesId == custInvoiceSalesLink.SalesId
&& custInvoiceJour.InvoiceDate == custInvoiceSalesLink.InvoiceDate
&& custInvoiceJour.InvoiceId == custInvoiceSalesLink.InvoiceId
&& custInvoiceSalesLink.OrigSalesId != _salesTable.SalesId;
the statement above from class: MCRSalesOrderTotals, method:
calcInvoicedExistMultiple(SalesTable _salesTable)
the statement seems to sum invoice amount, I tried to add info box to show what result calculated. it shows me huge amount that I believe sum almost whole table from CustInvoiceJour. and that is the reason this statement take long time.
does anyone using AX 2012 R3? if so, could you help to check if you have this class and method be hit while invoice sales invoice?
thanks in advance.