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 256

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,

  • bois0155 Profile Picture
    256 on at
    RE: Cannot find menu item

    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

  • Deepak Agarwal Profile Picture
    8,575 on at
    RE: Cannot find menu item

    Hello,

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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,017 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans