Admin dashboard changes to all users dashboard

Hi, I want to modify in admin default dashboard. Is it possible? If yes , will it affect to all users dashboards automatically?

For that what to do?

This thread explains how it is stored in the database, you can edit it from there.

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/15841-lost-dashlets-and-tabs-for-one-user

There is also a payed add-on that handles this in a more user-friendly manner, and an old open-source package you can try (the link is in that thread).

Hi, thank you for your reply. My query is only one dashboard should be available to all users and admin, which means the admin dashboard should reflect in all users dashboards.
If admin changes any chart (barchart , piechart,etc) or whatever in his dashboard it should affect all users dashboard automatically.But the values will differ based on user.

This should happen in default suitecrm of Suitecrm 7.10.9.

Is it possible?

I guess you can just copy that value in the database, from admin row onto every other row, every day, or every hour. You can add a custom Scheduler job to do this, you will just need a bit of PHP that runs an UPDATE query on the database.

Note that letting users manage their own dashboards is probably a good idea. They know what’s best for them. It helps productivity. I’d hate to have my Dashboard reorganized without my consent… If your company can devise a more respectful policy (while still achieving whatever goals you need to achieve), it would be better. This is just an opinion, of course. :slight_smile:

Thank you for your reply. Can you explain about this elaborately?

It’s in that thread I linked:

So, with a single SQL UPDATE statement you can update the dashboard of all users, something like this (in pseudo-code):

update user_preferences
set content = (select content from user_preferences where user_preferences.assigned_user_id = 1)
where user_preferences.assigned_user_id <> 1

(admin has user id 1)

Backup your database before playing with SQL, and use at your own risk.

There are many ways to do this repeatedly: manually, or automatically from crontab, or automatically from within SuiteCRM as a custom Scheduler.

This was by far the easiest and least expensive. Works like a charm!
Unlike the admin, I think having set dashboards is the way to go. It minimizes support calls for those that totally screw up their dashboard.

Can you share the actual SQL command you used? Since I just posted it as pseudo-code I guess it would be helpful to include here the final command. Thanks!

This was the suitecrm’s admin suggestion:

I took this and did it a bit modified.
I went into the database and viewed the user_preference table and l queried for the assigned_user_id =1 and copied the data from Content where category = ‘home’ and placed the data from content into notepad. It’s a pretty long code and for my example query I’ll rename it [CONTENTXXX] but you will want to copy and paste the EXACT full code into the content=’ ’ section.
I then went back to sql query (made a back up of the user_preference table) and ran this:

update user_preference set content = ‘[CONTENTXXX]’ where category=‘home’;

The query updates all affected rows. The users then have to logout and log back in to see the new changes.
I will explore the scheduler aspect of this at a later time but I figure if I am the admin (id=1) then if I ever have to modify and send this out again, it’s not to painful to do it manually anyhow.

1 Like