Query structure of PurchCalcTax_Invoice.updateParentForTaxTrans() in certain environments can lead to bad SQL execution plan and long query run times

Symptoms

Use USMF

Go to Accounts payable > Invoices > Pending vendor invoices
Click New

Set Invoice account = 1001
Set Number = Test01
Click Add line
    Set Item number = S0001
    Expand line details & click the Sales Tax tab
        Set Item sales tax group = AU/VI
        Set Sales tax group = 5Pct

Above the lines grid, click the Financials > Maintain charges

Set Charges code = FEE
Set Charges value = 50.00
Set Sales tax group = 5Pct
Set Item sales tax group = AU/VI

Save and close the Charges form
Click Post

At this point, the PurchCalcTax_Invoice.updateParentForTaxTrans() should be hit during the posting.

Expected result: The query plan that is used should look like the attached SQL execution plan with index seeks on SourceDocumentLine and TaxTrans with the Index seek on MarkupTrans being the last portion of the query executed.

Resolution

SQL execution plan with index seeks on SourceDocumentLine and TaxTrans with the Index seek on MarkupTrans being the last portion of the query executed

More information

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained here in is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Propriedades

ID do Artigo: 4013862 - Última Revisão: 22/02/2017 - Revisão: 1

Comentários