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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

CLR error in D365FO

(0) ShareShare
ReportReport
Posted on by 1,215

Hi guys,

While a debugging its stopped in run method.

below error:

Mukti.PNG

Can you tell me what it says that error ?

Thanks 

I have the same question (0)
  • Riyas ahamed F Profile Picture
    1,215 on at

    Additional information : while a importing excel sheet.

    issue : The menu item with name mpimportdata could not be opened.

  • Martin Dráb Profile Picture
    237,783 Most Valuable Professional on at

    Look at details of the $exception object (in the Locals windows when debugging).

    By the way, the exception handling code makes little sense to me. It has no positive effect; it just makes your debugging harder by swallowing important information.

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    It is a very common error and can happen for many reasons. You probably searched the internet and tested the solutions you saw.

    I looked for 5-10 minutes to see if there was a general solution. There are different solutions, from the one that says "refresh" the menuitem in AOT to the one that says I uninstalled and reinstalled the Model.

    You need to share the inner exceptions with us so that we can give more specific answers. Where you catch the error, instead of throwing an error again, you need to reach the details with a more meaningful code or as Martin suggested share the details of the exception object with us .

  • Verified answer
    Leo Chen Profile Picture
    on at

    Do something like below, you'll get the details of the exception

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-catch-exceptions-thrown-from-clr-objects

    pastedimage1624242542893v4.png

    pastedimage1624242557861v5.png

  • Verified answer
    Martin Dráb Profile Picture
    237,783 Most Valuable Professional on at

    Leo, there is a simpler way in D365FO:

    System.Exception ex;
    
    try
    {
        ...
    }
    catch (ex)
    {
        info(ex.ToString());
        throw; // Throwing the same exception object (with the same type, stack trace etc.)
    }

    But you normally don't need code like this, because the message is put into infolog automatically.

  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at

    Hi,

    Execute business operations in CIL in your user options and see if that makes a difference (restart your client before debugging).

    and then use Visual Studio debugger to see what happens there.

  • Riyas ahamed F Profile Picture
    1,215 on at

    Thanks to all its resolved!

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

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
Martin Dráb Profile Picture

Martin Dráb 692 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 364 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans