Results 1 to 2 of 2

Thread: how to create dashlet filtering on date

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

    Default how to create dashlet filtering on date

    I am trying to create a dashlet for Closed Opportunities for the current month.

    I know I didn't need to do this, as I could have changed the configuration each time, but I wanted a standard one that would always show what I wanted, and was reusable by others.

    I copied the MyOpportunites dashlet into the custom/modules/Opportunities/Dashlets folder, and butchered it until it had only the fields and filters i wanted.

    It works fine, except I dont know how to set it up so that it ALWAYS uses the current month.

    The dashlet data.php has:
    $dashletData['ClosedOpportunitiesThisMonthDashlet']['searchFields'] = array(
    'date_closed' => array('default' => ''),

    If I look at the dropdown fields when editing the dashlet, it says that "Last Month" is one of the options, along with today, this week, last week etc.

    But if I edit the default in the above dashlet and set it to:
    = array( 'date_closed' => array('default' =>array("Last Month '')),

    it actually crashes Apache.

    Any suggestions on how to define the default date_closed as Last Month, in a dashlet?

    also, any ideas how to stop it retricting opportunities to "MY" opportunities - the project leader is the one who will use this, and he wants to see all of the closed opportunities.
    I tried: 'assigned_user_id' => array( 'default' => '')
    but it had no effect.

    Would love to get this worked out.

    cheers
    Last edited by raynor; 2009-09-22 at 11:46 PM. Reason: added an extra question
    sugar professional 6.4.0

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

    Default Re: how to create dashlet filtering on date

    no suggestions?

    not even for how to stop it from restricting things to "My" opportunities, and choose everyones?
    sugar professional 6.4.0

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with Dashlet Filtering
    By chrislynch8 in forum Help
    Replies: 0
    Last Post: 2009-08-04, 01:13 PM
  2. Dashlet DATE format
    By KUMAR81 in forum Developer Help
    Replies: 3
    Last Post: 2009-02-26, 06:18 AM
  3. REGARDING Date format for DASHLET
    By KUMAR81 in forum Developer Help
    Replies: 0
    Last Post: 2009-02-25, 03:59 AM
  4. Dashlet is not filtering...
    By Abuelodelanada in forum Developer Help
    Replies: 4
    Last Post: 2008-01-28, 08:54 PM
  5. Create Task - Due Date & Start Date Calender Broken?
    By kickedmydog in forum Developer Help
    Replies: 1
    Last Post: 2005-10-05, 07:05 AM

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
  •