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 :
Microsoft Dynamics AX (Archived)
Answered

Object Reference Not Set Error

(1) ShareShare
ReportReport
Posted on by 3,542

I was doing an example on form extension.

The example includes creating a custom filter control on the MainAccount form.

I tried some of my own stuff, which went wrong. I received the following errors: "Object reference not set to an instance of an object. The menu item with name mainaccountdetails could not be opened."

1. I looked for the problem in my extension class. Could not find it.

2. Commented out all my code on the extension class for the form. No difference.

3. Deleted the extension class. No difference.

4. Deleted the extension form. No difference.

5. Deleted the project. No difference.

6. In visual studio d365 - model management - refresh models. Nothing.

So I still have the error. It would be great if someone can point me in a direction.

*This post is locked for comments

I have the same question (0)
  • Sukrut Parab Profile Picture
    71,735 Moderator on at

    after deleting extension did you build base package and extension package  ?

  • Pete Alberts Profile Picture
    3,542 on at

    Sounds like the answer...

    I'm gonna have to ask a stupid question: How do you build the base and extension package?

    Thank you very much for the reply

  • Pete Alberts Profile Picture
    3,542 on at

    Sukrut if you could look at another of my questions: determining a tree item type, I would be very thankful.

  • Nishant2408 Profile Picture
    705 on at

    Hi Pete,

    Even I have faced this issue few  times. You should perform a build for your extension packages and reference packages in visual studio.

    Build model option you'll get under Dynamics365 menu, from where you refreshed model parameters.

    Thanks!

    Nishant

  • Pete Alberts Profile Picture
    3,542 on at

    Thanks man, I am currently building!

  • Pete Alberts Profile Picture
    3,542 on at

    I built the Ledger package - no success. I am now building it with referenced packages (takes quite a while). Sukrut mentioned I should build the extension. Is there anything specific I should do to accomplish that?

  • Pete Alberts Profile Picture
    3,542 on at

    Build with referenced packages didn't work. I'm doing a full build now....

  • Suggested answer
    Nishant2408 Profile Picture
    705 on at

    have you checked that you completed your build successfully without any errors?

    How ever in my previous reply, I have mentioned that you have to build reference packages as well. Build should complete without any errors otherwise if any error is there that is of no use, no changes you will find.

  • Pete Alberts Profile Picture
    3,542 on at

    There were no errors. I quit the full build because it was taking too long - noob error lol.

    I'll do a full build tonight. I don't know what else there is left to do/try.......

  • Sukrut Parab Profile Picture
    71,735 Moderator on at

    HI Pete ,

    You can just select your extension package and base package from model parameters . select just check box and start build if you want selective package otherwise trying a full build is also option . Which other question (something with tree) you are talking about

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans