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

Cannot find menu item

(0) ShareShare
ReportReport
Posted on by 260

Hello All,

I'm facing a weird issue. I have a solution that print multiple reports when a button is clicked.

However, looks like d365 cannot find some menu items and throw an error saying "Object reference not set to an instance of an object."

I traced the code and I found where the problem is but I can't see why I'm getting this error.

The treeNode on the image below somehow is returning null for some menu items, but the weird thing is that if I run the same code with the same menu items in a runnable class it works normally.

Anyone has any ideas of what might be happening?

pastedimage1634139348903v1.png

Thanks,

I have the same question (0)
  • Deepak Agarwal Profile Picture
    8,602 on at

    Hello,

    Can you pl share your code here this screenshot is from standard class, where is your code. Also, share call stack.

  • bois0155 Profile Picture
    260 on at

    I found a workaround for it.

    I'm using controller.parmDialogCaption(MenuItemLabel);

    so it doesn't go to that function to try to find the menuitem to set the caption.

    I believe the issue might be related to some customization implement by another party which I don't have access.

    Thanks

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 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans