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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 227
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
    253 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
    238,109 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
    227 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 = ""

     

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 679 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 421 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 282 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans