ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Hide Dashboard By Default


When I open a project to manage tasks it always displays the Dashboard in the Down or Visible position.

I do not want that to be the default behavior. I want the default to be hidden unless I select the icon.

I have also noticed when I hide the dashboard and then Save a record the dashboard re-appears.

How can I do this?



Permission for view tasks under project?

put this code in your custom script of that doctype



can i hide the dashboard from a specific user


Yes, check the user and hide the dashboard in custom script.


where i can check the user and write custom script in doctype



You can get userid from session. Based on userid fetch information and hide dashboard.


ok how to hide not only collapse ??




Thank you . It works !


i`m trying to make only system admins and accounting are able to see dashboard

so i started with this

frappe.ui.form.on(“Project”, “onload”, function(frm, cdt, cdn) {
if (frappe.user_info(email_id) != “”) {
} });

but it desnt work any user can see the dashboard ??


i also tried this

cur_frm.cscript.custom_validate = function(doc) {
if(frappe.user_roles.indexOf(“Accounts Manager”) == -1) {
frappe.validated = false;

but also not working


ok finally made it by


and created a new role ‘Dashboard’ then assigned it to all profiles that we don`t want to make them see the dashboard


thanks for ur contribution but try this still not working dashboard hide from all user


share your script


i take script from @Mahmoud_Ghoneem



yes !!

Also to me it hidden the dashboard for the entire system users