Skip to content
Dynamics 365 Blog

 Issue description:

After installing application Hotfix released on KB #2786631, it is not possible to cancel Invoice in Invoice approval journal on AX 2009 SP1 RU6 kernel/application build #5.0.1500.3761 or higher, it is no more possible to make an annulment of a posted invoice register in Approval journal.

You get an error message stating that Vendor account XXXX does not exist.

Workaround description:

The failure is caused by code pattern in \Classes\LedgerJournalCheckPost\postTrans in above mentioned application hotfix as shown below:

………….

    if (!ledgerJournalTransUpdate)

    {

         ledgerJournalTransUpdate = ledgerJournalTransUpdateAmountIncl;

    }

………..

Change code as described below, save and compile:

…………

    // Workaround to ensure we have the correct TransUpdate type

    if (!ledgerJournalTransUpdate)

    {

         if (ledgerJournalTable.JournalType == LedgerJournalType::Approval

         && _ledgerJournalTrans.AccountType == LedgerJournalACType::Ledger

         && _isOffset)

        {

                      ledgerJournalTransUpdate = LedgerJournalTransUpdate::construct(_ledgerJournalTrans);

        }

        else

        {

             ledgerJournalTransUpdate = ledgerJournalTransUpdateAmountIncl;

        }

    }

 …………

 

Disclaimer:

This programming example is for illustration purposes only. Microsoft disclaims all warranties and conditions with regard to use of the programming example for other purposes. Microsoft shall not, at any time, be liable for any special, direct, indirect or consequential damages, whether in an action of contract, negligence or other action arising out of or in connection with the use or performance of the programming example. Nothing herein should be construed as constituting any kind of warranty.

BlogPost.docx

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!

Join the conversation

Loading comments...