Keep a menu item disabled

I’ve been asked to create a version of AR Invoice Entry that will always have New Misc Invoice and New Credit Memo disabled from the File > New menu. It is disabled when the form initially loads but I need to keep it disabled even after a group has been created. I found a topic to disable a menu item on the form load, but how can I also keep it disabled after a group is opened or created?

You have to determine what the tool key name is for those buttons easiest way is to use the ToolClick event with a message box to prompt the key.

From there you set that tool’s shared prop of visible to false or if you want it visible you can set it disabled but you will have to fight Epicor’s logic that wants to enable it. Your best bet there is probably to use a data view initialize to keep firing the disable = code, but it could be tricky. visible = false would be your best bet if you can.

1 Like

You can just hide the menu all together too

baseToolbarsManager.Tools["SaveTool"].SharedProps.Visible =false;
3 Likes

your tool name:

newMenuTool.Tools[“MenuItemName”].SharedProps.Visible=false;

image

1 Like