开发者

SugarCRM - How to set the default homepage for all users

I am using SugarCRM Version 5.2.0k (Build 5837). I would like to be able to set a default home page (with dashlets I've created myself) that will be the same for all users, can anyone advice on best way to do this? Thanks in adva开发者_如何学编程nce for your help


I'd like to know how to do this too... see here for some ideas, but it's clear that it's not a supported feature.

I wonder if you can write a module that installs a hook for post user creation (assuming that this hook is provided) and then populate the appropriate part of the user preferences table when the hook is invoked. Of course, your module will probably break with each upgrade of SurgarCRM, so this might be more trouble than it i worth.

Edit:

I had a look at the Dash Manager module that is referenced in the thread I linked to above. It's approach is to copy the preferences of the admin user to all other users when the administrator clicks a link in the admin page. So, the admin user is used as a sort of template for other users. Rudimentary solution, but not a bad start - using a template user and treating the preferences (as stored in the DB table) as opaque seems like the way to go.


It's quite easy to do it.

I have done it in SugarCRM 6.5.23.

Here I have mentioned steps to do it:

  1. Just copy sugarcrm_root/modules/Home/index.php and paste it in SugarCRM_root/custom/modules/Home/index.php.

  2. Now you can customize it's behavior as you want.

  3. You can remove default dashlets and add your own dashlets by creating one file at SugarCRM_root/custom/modules/Home/dashlets.php and add this code in it:

    <?php
        unset($defaultDashlets);
        $defaultDashlets = array(
            'CustomDashlet' => 'ModuleName',
            'UpcomingAppointmentsDashlet' => 'Meetings', //Example
        );
    
  4. Once you do this thing still you have 3 dashlets left in your hook code you can remove it if it's needed code for that hook is like this:

    $dashlets[create_guid()] = array(
         'className' => 'iFrameDashlet',
         'module' => 'Home',
         'forceColumn' => 0,
         'fileLocation' => $dashletsFiles['iFrameDashlet']['file'],
         'options' => array('titleLabel' => 'LBL_DASHLET_DISCOVER_SUGAR_PRO',
         'url' => '...',
         'height' => 315,
    ));
    

Hope this will help you. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜