Hello
I'm trying to hide the entire section of 'Do not use', but I can only hide the values of it.
This is the code used:
define("ContactCommunicationDetail", [],
function() {
return {
entitySchemaName: "ContactCommunication",
methods: {
getRestrictions: function() {
return {
"DoNotUse": {
"Visible": false,
"Enabled": false
},
};
}
},
// Define the differences in the UI
diff: /**SCHEMA_DIFF*/[
{
"operation": "remove",
"name": "DoNotUse"
}
]
};
});
Like
Hello,
the items for menu are formed in method getToolsMenuItems with basic structure on the module BaseCommunicationDetailCrtNUI and addition of restrictions in the override of this method in ContactCommunicationDetailCrtNUI,
With the replacing of the module like yours you could implement override function like this or anything similar to remove the undesired menu item. Checked on dev enviroment and seems to do the trick
getToolsMenuItems: function() { var menuItems = this.callParent(arguments); var myMenuItems = this.Ext.create("Terrasoft.BaseViewModelCollection"); Terrasoft.each(menuItems, function(menuItem, communicationValue) { if(menuItem.get("Caption")=='Do not use'){ menuItems.remove(menuItem); } }, this); return menuItems; },
Hello,
the items for menu are formed in method getToolsMenuItems with basic structure on the module BaseCommunicationDetailCrtNUI and addition of restrictions in the override of this method in ContactCommunicationDetailCrtNUI,
With the replacing of the module like yours you could implement override function like this or anything similar to remove the undesired menu item. Checked on dev enviroment and seems to do the trick
getToolsMenuItems: function() { var menuItems = this.callParent(arguments); var myMenuItems = this.Ext.create("Terrasoft.BaseViewModelCollection"); Terrasoft.each(menuItems, function(menuItem, communicationValue) { if(menuItem.get("Caption")=='Do not use'){ menuItems.remove(menuItem); } }, this); return menuItems; },