Hello,
We want to remove Merge, Doc Merge, and Doc Merge to PDF from the Mass Actions Menu. Can anyone provide a solution for this? We have tried the following solution, but it didn’t work:
Hello,
We want to remove Merge, Doc Merge, and Doc Merge to PDF from the Mass Actions Menu. Can anyone provide a solution for this? We have tried the following solution, but it didn’t work:
I disabled the Merge option for everyone except Admins in v12 Ent by
Modifying the css class for the merge action from the Find Duplicates Action so no action can be taken once you have found the duplicates other than preview.
In custom/clients/base/views/find-duplicates-headerpane/find-duplicates-headerpane.php
$viewdefs['base']['view']['find-duplicates-headerpane']['buttons']= array( array( 'name' => 'cancel_button', 'type' => 'button', 'label' => 'LBL_CANCEL_BUTTON_LABEL', 'css_class' => 'btn-invisible btn-link', ), array( 'name' => 'merge_duplicates_button', 'type' => 'button', 'label' => 'LBL_MERGE_DUPLICATES', 'css_class' => 'btn-primary disabled', 'acl_action' => 'admin', ), array( 'name' => 'sidebar_toggle', 'type' => 'sidebartoggle', ), );
I also hid the merge button from the recordlist (the dropdown you are showing) for everyone except Admins by modifying the RecordlistView controller to hide the button altogether for anyone who is not an admin.
custom/clients/base/views/recordlist/recordlist.js
({ extendsFrom: 'RecordlistView', initialize: function (options) { this._super('initialize', [options]); }, render: function() { this._super('render'); this.hideActions(); }, hideActions: function(){ user_type = app.user.get('type'); //disable duplicate merge for non-admin if(user_type != 'admin'){ $('[name="merge_button"]').hide(); } $('[name="mass_email_button"]').hide(); } });
Seems to work well so far.
You could extend this to the other actions you want to hide.
FrancescaS