How to add inventory on hand button to a new form?

Hi Everyone,

I need to add the inventory on hand button to a new form where i have the Item id field alone.

Tried adding the menu item button and getting the error “Object reference” error.

Which menu item you have added? Try \Menu Items\Display\InventOnhand
AX version?

Hi Kranthi,

Added the same menu item which you have pointed. It is D365.

On clicking the menu item, the below error occurs.

Object reference not set to an instance of an object.

I have only item id field in my form.

Right now i don’t have an environment to check. You can look at the standard forms for reference.
Example - WMSOrder