AnsweredAssumed Answered

How to hide some panel.name when we create contact? (sugar 7.8)

Question asked by Nick Gamora on Jun 22, 2017
Latest reply on Jun 22, 2017 by André Lopes

Hi,
I try to hide some panel.name form not admin users like this
({     extendsFrom: 'CreateView',
 
       initialize: function (options) {
          app.view.invokeParent(this, {type: 'view', name: 'create', method: 'initialize', args:[options]});
          var isAdmin = app.user.get('type') == 'admin';            
          if (!isAdmin) {
             this.meta.panels = _.filter(this.meta.panels, function (panel) {                    
             if (!(panel.name == "pane-recycle-styler" || panel.name == "panel_hidden_recycles" || panel.name == "panel_hidden_recycle_assign" || panel.name == "panel_hidden_activity")) return true;
             return false;
                })
           }    
       },
})

 

but I have more issue, Please HELP!
I try to put this  into record.js in custom/modules/Contacts/clients/base/views/record/record.js
may be need  another file?

Outcomes