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 0

Like

1 comments
Best reply

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;
			},

 

Show all comments

Hello,

 

I would like to set the Do not use email value from Contact communication detail based on the field with the same name from Contact.

 

How could I do this? If I want to add a Business Rule from the Detail, the page does not open.

 

Thanks

Like 0

Like

2 comments

Hello,

Thank you for your question!

Please provide us with more detailed information about the functionality you need. Please tell us what your business task is and what is the ultimate goal of this functionality. We would also like to note that theoretically, this can be implemented through a business process, but we need more details for a better analysis. Unfortunately, this cannot be achieved with business rules. 

Viktoriia Hrynchuk,

Hi! At first, I wanted to set up the value of 'Do not use email' through a process based on another field. When I did this, I saw that I'm only modifying the value of the 'DO not use email' from Contact, but not the one from Communication options. The goal is to set up the value of that one through modify or script task. Because that didn't work, I thought that maybe filtering the one in Communication option based on the one from the Contact would help, but it actually works the other way around. 

Show all comments