Custom button not working when pressing "select all"

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