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 :
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,710 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,710 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

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans