hide remove import menu option

Hi

How can I hide/remove or disable the import feature in code for all modules or certain modules.

1. for all modules

     ?

2. for accounts and opportunities only?

Thank you in advance

Peter

Parents
  • Hello,

    I could manage to achieve it in a more generic way, so you wouldn't need to do it for every module, since you asked to do it for all modules.

    - Create a custom/clients/base/views/module-menu/module-menu.js
    - Extend from original one

    Fullscreen
    1
    extendsFrom: 'ModuleMenuView',
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    - Extend filterByAccess with the following

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    filterByAccess: function(meta) {
    var self = this;
    var temp0 = this._super('filterByAccess', [meta]);
    var temp = [];
    _.each(temp0, function(menuItem) {
    if (menuItem.acl_action != 'import') {
    temp.push(menuItem);
    }
    });
    return temp;
    },
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Juane

Reply
  • Hello,

    I could manage to achieve it in a more generic way, so you wouldn't need to do it for every module, since you asked to do it for all modules.

    - Create a custom/clients/base/views/module-menu/module-menu.js
    - Extend from original one

    Fullscreen
    1
    extendsFrom: 'ModuleMenuView',
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    - Extend filterByAccess with the following

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    filterByAccess: function(meta) {
    var self = this;
    var temp0 = this._super('filterByAccess', [meta]);
    var temp = [];
    _.each(temp0, function(menuItem) {
    if (menuItem.acl_action != 'import') {
    temp.push(menuItem);
    }
    });
    return temp;
    },
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Juane

Children
No Data