Dashboard Manager – Control your users home page and dashboard

Transcription

Dashboard Manager – Control your users home page and dashboard
Dashboard Manager – Control your users home page and dashboard
Authors Name: Ken Brill
Date: May 17th, 2010
Version: 6
SugarCRM® Versions: 5.5.1, 5.5.2, 6.0.0
SugarCRM® Flavors: Open Source, Professional and Enterprise
Related files: HomepageManager.zip
This module allows an admin to “copy” a homepage configuration and “paste” in onto other users.
There are two ways this can be done
1. The current user (an admin) could make a copy of their homepage
a. The admin can set up his/her homepage the way they want to. Then they would go to the
Admin menu and select “Default Homepage”
b. They would then name the copy, maybe “Sales Default”
c. They could then edit a users record and set it up to use that copy as the homepage or the
dashboard or both. You could use different copies for each if you wanted.
d. This method is static. Once the copy is made, the admin could make changes to their
homepage and those changes would not affect the copy. So the admin user is free to reset up
their homepage and dashboard and create another default.
2. They could simply set the user to “Follow” another users home page and/or dashboard.
a. On the same dropdown you can select another users homepage and/or dashboard.
b. So if you edited Will and set him to follow Jim's homepage, each time will logged in he would
see Jim's homepage and dashboard (with Wills data on it of course)
c. As Jim makes changes, those changes will be copied to Will the next time he logs in.
© 2004-2010 SugarCRM Inc. All Rights Reserved.
1
Technical Description
Method #1 works by creating a copy in the user_preferences table of the admin users 'home' and
'dashboard' records and then assigning them to a non-existent user with an ID of the name they assigned
to the copy (with dd_ prepended to it). When the target user logs in the after_login hook is used to copy
these records to his user profile. Since the built-in setPreference and getPreference are used and not a
seperate table it should be upgrade safe.
Method #2 simply sets a trigger that looks up the target user and copies his/her user_ preferences
to the newly logged in user. This method allows a sales manager to control a group of users more easily
as at most you would have to change the settings on one user and all the users that are pointed at that
user would follow suit automatically.
By default this would overwrite ANY changes the user makes to his own homepage or dashboard during
a session, that is if he is allowed to make any at all. There is a switch on the Users Editview that allows
you to tell the system that this is a one-time event. When this is checked, the next time the user logs in
they will receive the dashboard and/or homepage and then they are free to edit it from there (pending
settings in System Settings). That way you can setup new users with the homepage and dashboard you
want, but still allow them to edit it as they wish.
© 2004-2010 SugarCRM Inc. All Rights Reserved.
2
This is the users editview. You could attach this user to one of the saved templates or have them “Follow”
another users home page.
The “Only on next login” will clear these settings after the user logs in next time. That way they are free
to do whatever they want to their homepage and dashboard from that point on without the system
“resetting” it again.
The Lock Homepage option will lock this users homepage and keep them from changing it. This is
exactly like the “Prevent user customizable Homepage layout” on the System Settings page except
that this option only affects this user not all users. If the “Prevent user customizable Homepage
layout” option is turned on, it overrides this setting, that is to say that if you check the “Prevent user
customizable Homepage layout” box on system settings then noone will be able to edit their homepage
no matter what you do on this page.
© 2004-2010 SugarCRM Inc. All Rights Reserved.
3
This page is available from the Administration shortcut menu. In 6.0.0 PRO/ENT this moves to the hover
over dropdown menu. This is the page where an admin could save a copy of their homepage. You
woould just give it a unique name and click save. The bottom control allows you to delete saved
homepage setups.
© 2004-2010 SugarCRM Inc. All Rights Reserved.
4