How to remove ListView action in Sugar 7.7.1 ?

Hi All,

Please see below screen shot, I want to remove ListView action.

Below code was working in Sugar 7.6 but not in 7.7.1, please suggest me.

path\custom\modules\Accounts\clients\base\views\recordlist\recordlist.js

({
extendsFrom: 'AccountsRecordlistView',
initialize: function (options) {
 this._super('initialize', [options]);
},
_render: function(options) {
 this._super('_render',[options]);
 $('[name="addtolist_button"]').remove();
}
})

Thanks,

Shyam

Parents
  • Hi Shyam,

    My recommendation would be change it from definitions. I wouldn't involve the JS codes. 

    So simply, duplicate ./modules/Accounts/clients/base/views/recordlist/recordlist.php to your custom folder. 

    Then from the definition remove following code block;

                array(
                    'name' => 'addtolist_button',
                    'type' => 'button',
                    'label' => 'LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL',
                    'primary' => true,
                    'events' => array(
                        'click' => 'list:massaddtolist:fire',
                    ),
                    'acl_module' => 'ProspectLists',
                    'acl_action' => 'edit',
                ),

    Save and Quick Repair and Rebuild. 

    Best Regards
    Tevfik Tümer
    Developer Support Engineer

Reply Children