How to call menuitem in D365

Dear All,

I am using D365.

I purchtable form extension i want to call a menuitem.

so i tried call by using below code

element.args().menuItemName() == menuItemDisplayStr(xxx)

but this is not working

that element key word is not there even.



Use enum properties in menu item(Enumtype,EnumValue). find below blog for example…/

Your code does a completely different thing - it doesn’t call any menu item; it checks whether the form was called from a menu item with a given name.

Please give us a more detailed description of your requirement. For example, maybe you have a menu item button in the form you’re extending and your intention is getting the same behaviour as if a user clicked the button. Then it might be useful to know at which situation you want to execute this logic.

[mention:c291c7c4ff374fa7addbd7a117f91ec7:e9ed411860ed4f2ba0265705b8793d05]: Can you explain how your reply addresses the problem?