Lost Dashlets and Tabs for one user

I have one user that deleted their dashlets and then tabs from their ā€˜homeā€™ page.

Now they have a blank home page and the no ability to add new tabs.

I have done a quick repair to try and reset things, but to no avail.

Appreciate any guidance or ideas.

thanks!
Jon Paul

I havenā€™t tested this, play with it at your own riskā€¦

In the database, which you can access through phpMyAdmin or similar, the table user_preferences contains one row for that user (referenced in column ā€œassigned_user_idā€) that has a ā€œcategoryā€ column with value ā€œhomeā€. The ā€œContentā€ column on that row contains the userā€™s dashboard settings.

I would copy some other userā€™s ā€œContentā€ of ā€œHomeā€ into that row, and see if you can work from there.

Good luck

3 Likes

This worked perfectly - thank you!

It is encrypted content in db for 7.8.8 I think see the seen shot https://s.nimbus.everhelper.me/share/1208557/sawq5wyb1nouizvsqxxl

It is not encrypted, it is merely encoded. I believe it is base64 encoding, you can try pasting that into an online base64 decoder and see the contents.

Anyway, you just have to copy it, not understand it. You design your Home screen within SuiteCRM using drag-and-drop, when itā€™s ready, you copy that data into other userā€™s, and they get a similar Home screen. Simple.

1 Like

yes done by print_r(unserialize(base64_decode ($content)));
now I can see data

thank you

How can I add dashlets from the database ?
for example:

adding a line code like:

s:36:ā€œdb6ac748-fad4-11e7-8eed-02ebe79bd5b8ā€;a:4:{s:9:ā€œclassNameā€;s:17:ā€œAORReportsDashletā€;s:6:ā€œmoduleā€;s:11:ā€œAOR_Reportsā€;s:7:ā€œoptionsā€;a:2:{s:12:ā€œdashletTitleā€;s:7:ā€œReportsā€;s:13:ā€œaor_report_idā€;s:36:ā€œ5d3465c6-e4b7-33e8-38c4-5a00d401ae22ā€;}s:12:ā€œfileLocationā€;s:68:ā€œmodules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.phpā€;}

what should I have in mindā€¦?

I donā€™t understand what you pasted there.

But the general idea is this: work with the array in PHP, after it is unserialized an decoded.

Your code can be based on this function, I believe:

https://github.com/salesagility/SuiteCRM/blob/932b87108edc154dd3c9c86b57ceaa24acd40835/modules/UserPreferences/UserPreference.php#L391

You might also enjoy trying this out:

https://github.com/geraldclark/DashboardManager

I have no idea if it will work with SuiteCRM, but it might

1 Like