Hello,

 

I have a custom button on Contact Section. This button allows the user to set up the Owner to multiple Contacts when selected.

 

The problem appears when I "Select all" the button turns gray and cannot be pressed. If I choose "Select multiple" and check the same records (contacts) then the button works.

 

 

In this example there are a lot of records, but I've tried the same thing with only 20 contacts that are all loaded in the page (scrolled until the last one) and it does the same. 

Like 0

Like

2 comments

We would need to see the details for the custom button to know why this behavior happens. What is the enabled property of the button bound to?

Hello Diana,

I've found an informative article according to your request for a comfortable understanding of the needed steps:
1) Please, find the added function with the same functionality as "getSectionActions"  from the article (paragraph 4).
2) Add new property to the object:
    "IsEnabledForSelectedAll": true

As a result, the code will look like:

getSectionActions: function() {
                    var actionMenuItems = this.callParent(arguments);
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        "Caption": {bindTo: "Resources.Strings.MultiplyChangeAction"},
                        "Click": {bindTo: "showLoanInfo"},
                        "Enabled": {bindTo: "isCustomActionEnabled"},
                        "IsEnabledForSelectedAll": true
                    }));
                    return actionMenuItems;
                }                  
Show all comments

Hi Team,



I would like to apply the "enabled" property to active row buttons COPY & DELETE in  contact section.



 

I have tried the below code but it doesn't work.

{
		"operation": "merge",
		"name": "DataGridActiveRowCopyAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},
{
		"operation": "merge",
		"name": "DataGridActiveRowDeleteAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},

 

 

Kindly guide me to achieve the Enable/Disable operation in active row buttons of contact section (COPY & DELETE).



Thanks in advance!

 

 

 

Best Regards,

Bhoobalan P.

Like 0

Like

4 comments

Hi Bhoobalan, 

 

please use "visible" : false

 

instead of 

"enabled": false

and the button will be hidden.

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,



Thanks much for the response!



Yes, I have tried with visible and its working but I wanted to Disable the button for few users. The button should be displayed and disabled.





Could you please guide on achieving it?

Bhoobalan Palanivelu,

 

I'm not sure that it's possible and we don't have practical examples of such implementation using js code.

 

However, the best way to achieve it will be setting up the Object permission, it will be much easier for you and best in terms of implementation: 

 

 

Regards, 

 

Bogdan L.

 

Bogdan Lesyk,



Thanks, This OBJECT permission is OOTB and it works.

I tried to depict the button to user as disabled and to inform/give an idea as that this button is not available to click.



Thanks,

Bhoobalan P.

Show all comments