Deactivation of "Grouped Tabs" for all users

Idea created by René "Tiri" Dippe on Oct 29, 2015
    Active
    Score20
    • René "Tiri" Dippe
    • Harald Kuske
    • Ishani Lad
    • Mark Willert
    Hi folks,



    This is about a very simple and (mostly) upgrade-proof way to deactivate grouped
    tabs in menu bar for all users


    Maybe you'll ask why I want to remove a feature that has been removed with 6.0  and re-implemented (only because the community called for it) with 6.1.    The answer is quite simple: 'cause I was advised to do so.    Here's what I did (keep in Mind I'm working with SugarCRM 6.5.20 only and have  no experience with older or newer versions where the solution might differ therefore.)   

     

       
    1. I created a new .js file named customJavascript_user.js in
      #{sugarcrm}/custom/modules/users
    2.  
    3. I then added the following JavaScript jQuery code in it 
          /*        very simple custom functionality to deactivate grouped tabs in menu bar for all users        without allowing any user to reactivate it (by hiding the corresponding form field)                author: René "Tiri" Dippe      */      $(document).ready(function() {        $("#use_group_tabs").attr("checked", false);        /*          at the next line we have to use the id of the enclosing table row element to select it directly,          this is because of an issue with $("#use_group_tabs").parent().closest("tr").hide() in "create new user" form.          the version below works for both "create new user" and "edit user" forms        */        $("#use_group_tabs_row").hide();      });  
    4.  
    5. I moved to #{sugarcrm}/custom/modules/users/metadata and opened the editviewdefs.php
    6.  
    7. I added the following key-value-pair to the <b>templateMeta</b> array (to make it easy to find, I just put it as first key) 
          'includes' =>      array (        0 =>        array (          'file' => 'custom/modules/Users/customJavascript_user.js',        ),      ),  
    8.  

     

       

    After that I just refreshed the SugarCRM tab in my Browser and everything worked fine.

     

    PS: If it should not work immediately, try a QRR (Quick Repair & Rebuild) via Admin > Repair > Quick Repair & Rebuild to solve that issue