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

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
    239,040 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
    Microsoft Employee 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
    239,040 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

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 616

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans