Results 1 to 4 of 4

Thread: How to create favorites dashlet?

  1. #1
    raynor is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    sydney
    Posts
    71

    Default How to create favorites dashlet?

    one of our user managers has asked for a new dashlet, similar to My favorites, but he wants to select by assignee.
    ie he wants to see which records his team has marked as favorites.

    I can't even find the code for the My Favorite Records dashlet.

    Any idea where to start?

    cheers

    (version 6.1.0)
    sugar professional 6.4.0

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to create favorites dashlet?

    Hello,

    You can start from >> modules/SugarFavorites/Dashlets/SugarFavoritesDashlet/SugarFavoritesDashlet.php
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    raynor is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    sydney
    Posts
    71

    Default Re: How to create favorites dashlet?

    d'oh. version control.
    my local version was only version 6, and didnt have that folder.
    dev and production are version 6.1

    I found the dashlet and copied it to the custom folder in dev.
    It didn't have any customisation, so I edited the dashlet to set $this->isConfigurable = true;

    There was no data dashlet or filtering, so I created sugarfavoritesdashlet.data.php.
    The contents are as follows below.
    However the filtering is not working at all.
    I've done a repair, but although i can now configure it, so that I don't just display my records, the filter settings don't seem to be applying.
    I can select a username, but it's not restricting the records to his records only - it still shows mine.

    Any tips?


    global $current_user;

    $dashletData['SugarFavoritesDashlet']['searchFields'] = array( 'module' => array('default' => ''),
    'assigned_user_id' => array('type' => 'assigned_user_name',
    'default' => $current_user->name,
    'label' => 'LBL_ASSIGNED_TO'));
    $dashletData['SugarFavoritesDashlet']['columns'] = array('name' => array('width' => '40',
    'label' => 'LBL_LIST_ACCOUNT_NAME',
    'link' => true,
    'default' => true),

    'module' => array('width' => '15',
    'label' => 'LBL_LIST_MODULE'
    ),
    'date_entered' => array('width' => '15',
    'label' => 'LBL_DATE_ENTERED'),
    'date_modified' => array('width' => '15',
    'label' => 'LBL_DATE_MODIFIED'),

    'assigned_user_name' => array('width' => '8',
    'label' => 'LBL_LIST_ASSIGNED_USER'),

    );
    sugar professional 6.4.0

  4. #4
    cff_moiseszaragoza is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    109

    Default Re: How to create favorites dashlet?

    By any chance do you know how to make it sort by favorites

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create project dashlet?
    By ringoysl in forum General Discussion
    Replies: 17
    Last Post: 2012-03-30, 05:24 PM
  2. How to create an own chart Dashlet in 5.0.0c
    By kuske in forum Developer Tutorials
    Replies: 38
    Last Post: 2012-03-24, 12:57 PM
  3. Replies: 1
    Last Post: 2010-10-29, 12:23 PM
  4. Replies: 1
    Last Post: 2009-03-06, 03:59 PM
  5. quick create dashlet
    By gobezu in forum General Discussion
    Replies: 1
    Last Post: 2007-02-20, 09:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •