V13: Hide Dashboard

Hello,
Is there any possible script to hide the new dashboard of v13! I mean hiding Overview, Stats & Connections sections from Customer Doctype. v13-customer’s%20dashboard|690x404
as the below code is not working for v13:
cur_frm.dashboard.frm.fields[0].df.hidden=1;

1 Like

Does this work?

cur_frm.dashboard.hide()
3 Likes

@kennethsequeira It worked! Thank you so much!

Where did you put that statement (cur_frm.dashboard.hide()). I suppose it goes in a Client Script, but could you put as example the entire script content?

1 Like

Yes, that’s a client script. Here’s an example on Item Doctype:

frappe.ui.form.on('Item',  {
    refresh: function(frm) {            
        if(!(frappe.user.has_role(['Accounts Manager'])))
        {
               cur_frm.dashboard.hide();
        }
    } 
});
1 Like

It works! Thank you.