How to hide some menuitems under menus in content pane

Hi All,

I want to hide some menuitems under Menus when AX start or change company in AX 2009. For example I have two menuitems, menuitemA, menuitemB under menus. When It is compay A, I want to show only menuitemA. when it is companyB, I want to show only menuitemB. Does anyone know?

Thanks!!

Paicy

With the help of security keys, roles set by the system administrator.

hi ,

u can write the code in sysstartupcmd class to find the company and u can make visible true or false the menuitem

thanks,

sreekanth

Hi Screekanth,

Thanks for you reply, I don’t how to make menuitem under Menus invisible. there is a property called “IsDisplayedInContentArea”, But when I try to set it, error occur, My code is as below

treeNode treeNode;

xInfo xInfo = new xInfo();

;

treeNode = xInfo.rootNode();
treeNode = treeNode::findNode(“Menus”).AOTfindChild(“HamicyOS”).AOTfindChild(“PatientDetails”);
treeNode.AOTsetProperty(“IsDisplayedInContentArea”, noyes::Yes);

Thanks a lot.

Paicy

Hi Abhinay,

You are right, Menuitems can not be hidden without the help of Secuirty key.

Thanks a lot.

Paicy