web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Invoice Proposal when Posting "Posting Exception has been thrown by the target of an invocation"

(5) ShareShare
ReportReport
Posted on by 265
I am currently working on a DevBox (cloudhosted vm) that we restored the DB fro the UAT environment.  However, on the DevBox, I get the following error when I try to Post a Project Invoice Proposal  "Posting Exception has been thrown by the target of an invocation" What can cause this error?  I have tried debugging but struggling to find what is triggering it.
The Posting of the invoice proposal on the UAT environment works fine.
 
How can I fix this.
 
Kind regards
Categories:
I have the same question (0)
  • Naveena Reddy Profile Picture
    279 on at
    Hi, have you checked below setups?
     
    1. Missing any financial dimensions?
    2. Any invalid financial dimensions?
    3. Check if Funding source is active
    4. Missing sales tax group or Item sales tax group?
     
    Remove, re add and then try to post the invoice proposal again.
     
    Thanks & Regards,
    Naveena G.
  • Martin Dráb Profile Picture
    239,035 Most Valuable Professional on at
    This is a generic error meaning that there was a method called via reflection which throws an exception. Until you extract the inner exception, you have no idea about what happened, and therefore you aren't in a position to design a solution.
     
    You need to do more work in the debugger. Consider configuring Visual Studio do break on System.Reflection.TargetInvoicationException, or put a breakpoint to Info.add() and start there.
  • Sophs@4Sight Profile Picture
    265 on at
    Thank you for the responses.
    @Naveena I checked all these items and they were correct.
    @Martin So during the debugging it goes through all the processes to create the invoice and lines, even stepped the commit.  I noticed this when it hit the try catch {"Method not found: 'Void Microsoft.Dynamics.Commerce.Headquarters.Instrumentation.CommerceHQEventSource.EventWritePaymentsInvoiceEndUpdateStart(Int64, System.String, Boolean)'."} 
     
    And the exception  occurs in FormLetterService.runSingleThread in the following catch

    catch (Exception::CLRError)
    {
        updateError = true;

        clrException = CLRInterop::getLastException();

        logText = "@SYS331662"; //Set default error text in case we can't get the last exception.

        if (clrException)
        {
            logText = clrException.get_Message();
            ApplicationUnhandledExceptionLogger::logCLRException(clrException);
        }
        error(logText);

        this.handleError(logText, formletterParmTable);

     

    When entering the info.add() This is what I get

    _exception = {"Method not found: 'Void Microsoft.Dynamics.Commerce.Headquarters.Instrumentation.CommerceHQEventSource.EventWritePaymentsInvoiceEndUpdateStart(Int64, System.String, Boolean)'."}

    _txt = Posting    Exception has been thrown by the target of an invocation.

    _helpurl = ""

    _label = ""

     
  • Anton Venter Profile Picture
    20,656 Super User 2026 Season 1 on at
    There is a clue in the error message. Method not found and something to do with Commerce? Are you running Commerce in production? You probably don't have this enabled / installed / configured in Dev right?
     
    It seems you have configuration enabled in your Dev environment which is now failing because a dependency (config or software) is missing on your Dev environment. When the breakpoint in Info.Add is hit, check the call stack in Visual Studio to see where it originates from and how to fix it or work around it.
     
     
     
  • Suggested answer
    AhmedK Profile Picture
    4 on at
    Hi all,
     
    On a deeper investigation on the above, I discovered that it is a known issue on the platform update 10.0.45 where certain dll files are not removed/replaced with the newer ones.
     
    To resolve the issue I applied a quality update of the latest platform update and imported the DB again to resolve the posting error since the DB had fields which were now missing due to the above. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 659

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 465 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 304 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans