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