AnsweredAssumed Answered

How to hide edit button in Dashboards module home sugarcrm 9.3?

Question asked by Nick Gamora on Jan 31, 2020
Latest reply on Feb 4, 2020 by Nick Gamora

After update to  9.3 we have some error - View Render Failed, but our customization is very simple.

({
extendsFrom:'DashboardHeaderpaneView',

initialize: function(options) {
this._super("initialize", [options]);

if( app.user.get('type')!= "admin" && this.module=="Home"){
   this.meta.buttons[0].buttons = _.filter(this.meta.buttons[0].buttons, function(obj){
   return obj.name!='edit_button' && obj.name!='add_button' && obj.name!='duplicate_button';
});

this.meta.panels[0].fields = _.filter(this.meta.panels[0].fields, function(obj){
return obj.name!='my_favorite';
})
this.model.on('sync', function () {
$('.headerpane .btn-toolbar').css({'display':'none'});
$('.headerpane span[data-type="favorite"]').css({'display':'none'});
}, this);
}
}

})


How to fix them?

Attachments

Outcomes