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, ...
Answered

SO Invoice Error: Posting Exception has been thrown by the target of an invocation.

(7) ShareShare
ReportReport
Posted on by 1,570
Hi all,
 
We are facing the error while generating the invoice of sales order in D365 FO.
Error details are a below.
 
We try to debug, but can't able to find anything. 
It occurs in dev instance.
 
If anyone have any details/solution regarding the error, then it will be really helpfull.
 
Thanks,
Raj D Borad
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    239,602 Most Valuable Professional on at
    Then you need to continue debugging until you find where the exception comes from.
     
    If you have no idea where it may be, one of possible approaches is adding a breakpoint to Info.add() and checking the stack trace. Or you can configure Visual Studio to break immediately when a NullReferenceException is thrown (the same way as what I did for TypeInitializationException in Details of type initializer exception).
  • Raj Borad Profile Picture
    1,570 on at
     

    During debugging, the following exception is thrown:

    System.MissingMethodException: Method not found:

    'Void Microsoft.Dynamics.Commerce.Headquarters.Instrumentation.CommerceHQEventSource.EventWritePaymentsInvoiceEndUpdateStart(Int64, System.String, Boolean)'

    The same error is also logged in Event Viewer.

    Additional Details:

    • Issue occurs only in DEV (new VM)
    • No customizations related to the affected area
    • Database restored from UAT, and UAT works fine.
     
     
  • NP-03120851-0 Profile Picture
    4 on at
    Did you find any solution?
  • maqkhan Profile Picture
    3 on at
     
    referencing this: Details for issue 855772 

    Will update about it if i found a solution,
  • Deepak Agarwal Profile Picture
    8,977 on at
    Why you are unable to debug this, is it your debugger not hitting or you dont know where to put debugger. 
    Sometimes its tricky to enable debugger. 
  • CU19121912-0 Profile Picture
    on at
    Did you find any solution?  We are also facing the same error.
  • Verified answer
    vishalsahijwani Profile Picture
    222 on at
    Hi @RA Jones , 
     
    Solution1 - I hope you have tried Debugging Info class's add( ) method for exception as this gives out the actual place of origin of the exception. 
     
    Solution 2 - I would recommend you to put Proactive Quality Update 45 as the screenshot which you mentioned shows the version last number as 35 which means that only Service Update 45 has been deployed on your Dev machine and Service update had lot of bugs. 
     
    Either of the above two solutions will definitely help you to get of this jam. 
     
    Please check if this helps !!!
  • SW-27020911-0 Profile Picture
    2 on at
    I'm not sure whether you've fixed it or not.
    Below is my scenario ,a little different from yours.
     
    Error when post pro forma confirmation with printing for SO
    "Exception has been thrown by the target of an invocation"
     
    then I found there is error when posting PO  pro forma confirmation,
    but the error is 
    "Posting  Unhandled clr exception occurred.
     
    The legal entity’s Tax registration (VAT ID) can’t be empty. Check the master data settings in the Registration IDs of the legal entity and/or in Tax authority and Sales tax settlement Periods"  
     
    The below link provides the full check and fix list, I tried and fixed my issue including PO and SO.
    .


     
  • Suggested answer
    Lauras U Profile Picture
    959 on at
     
    I had exactly same issue with 10.0.45 devbox.
    This is what happened:
     
     
    TL;DR: Copy `Microsoft.Dynamics.Commerce.HQ.Instrumentation.dll` from `c:\AOSService\PackagesLocalDirectory\Retail\bin\` to `c:\AOSService\PackagesLocalDirectory\ApplicationSuite\bin\` and `c:\AOSService\webroot\Bin\`
  • Verified answer
    Nisarg  Jani Profile Picture
    567 on at
    Hi 
     
    The Issue is likely due to the version in 10.0.45 Platform69 issue can be found in the LCS Issue Search, as follows.
     
    For the Solution needed to upgrade the version of the CHE instance.
     

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 April 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 771

#2
André Arnaud de Calavon Profile Picture

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

#3
Subra Profile Picture

Subra 496

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans