Results 1 to 2 of 2

Thread: My Prospects Dashlet

  1. #1
    SebastienBillard is offline Junior Member
    Join Date
    May 2009
    Posts
    4

    Default My Prospects Dashlet

    Sugar version: SugarCE-Full-5.2.0e
    PHP 5.2.9
    Apache2
    Fedora core 3
    I have attempetd to create a MyProspectsDashlet.

    What I did is I copied MyLeadsDashlet and basically replaced all references to leads with prospects.

    BUt that does not seem to have worked.

    here is the content of my 3 files.

    Code:
    MyProspects.php
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /**
      */
    
    require_once('include/Dashlets/DashletGeneric.php');
    require_once('modules/Prospects/Prospect.php');
    
    class MyProspectsDashlet extends DashletGeneric { 
        function MyProspectsDashlet($id, $def = null) {
            global $current_user, $app_strings;
    		require('modules/Prospects/Dashlets/MyProspectsDashlet/MyProspectsDashlet.data.php');
    		
            parent::DashletGeneric($id, $def);
             
            if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_PROSPECTS', 'Prospects');
            
            $this->searchFields = $dashletData['MyProspectsDashlet']['searchFields'];
            $this->columns = $dashletData['MyProspectsDashlet']['columns'];
            $this->seedBean = new Prospect();        
        }
    }
    
    ?>
    Code:
    MyProspects.meta.php
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /**
     */
    
    $dashletMeta['MyProspectsDashlet'] = array('module'	=> 'Prospects'
      'title' => translate('LBL_LIST_MY_PROSPECTS', 'Prospects'), 
     'description' => 'A customizable view into Prospects',
     'category'    => 'Module Views');
    ?>
    MyProspects.data.php

    Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /**
     */
    
    
    
    global $current_user;
    $dashletData['MyProspectsDashlet']['searchFields'] = array('date_entered'     => array('default' => ''), 
    
    
    
                                                           'status'           => array('default' => array('New', 'Assigned', 'In Process')),
    													   'assigned_user_id' => array('type'    => 'assigned_user_name', 
                                                                                       'default' => $current_user->name));
     
    $dashletData['MyProspectsDashlet']['columns'] = array('name' => array('width'          => '40', 
                                                                      'label'          => 'LBL_NAME',
                                                                      'link'           => true,
                                                                      'default'        => true,
                                                                      'related_fields' => array('first_name', 'last_name')), 
                                                      'title' => array('width' => '10',
                                                                       'label' => 'LBL_TITLE'),
                                                      'lead_source' => array('width' => '10',
                                                                             'label' => 'LBL_LEAD_SOURCE'),
                                                      'status' => array('width' => '10',
                                                                        'label' => 'LBL_STATUS'),
                                                      'email1' => array('width' => '10',
                                                                        'label' => 'LBL_EMAIL_ADDRESS',
                                                                        'sortable' => false,
                                                                        'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',),
                                                      'account_name' => array('width' => '40', 
    												  						  'label' => 'LBL_ACCOUNT_NAME'),
                                                      'phone_work' => array('width'   => '10',
                                                                            'label'   => 'LBL_OFFICE_PHONE',
                                                                            'default' => true),
                                                      'phone_home' => array('width' => '10',
                                                                            'label' => 'LBL_HOME_PHONE'),
                                                      'phone_mobile' => array('width' => '10',
                                                                              'label' => 'LBL_MOBILE_PHONE'),
                                                      'phone_other' => array('width' => '10',
                                                                             'label' => 'LBL_OTHER_PHONE'),
                                                      'date_entered' => array('width'   => '15', 
                                                                              'label'   => 'LBL_DATE_ENTERED',
                                                                              'default' => true),
                                                      'date_modified' => array('width'   => '15', 
                                                                               'label'   => 'LBL_DATE_MODIFIED'),    
                                                      'created_by' => array('width'   => '8', 
                                                                            'label'   => 'LBL_CREATED'),
                                                      'assigned_user_name' => array('width'   => '8', 
                                                                                    'label'   => 'LBL_LIST_ASSIGNED_USER'),
    
    
    
    
                                                     );
    ?>

    any idea what I did wrong?
    I did a rebuild sugar dashelts
    I can addf the dashlet, although for some reason it shows up as being LBL_LIST_MY_PROSPECTS
    instead of the name I gave it.
    But once I add it, my homepage shows up completely blank, none of the dashlets show up
    Reseting my homepage preferences doesn't seem to fix the problem at all.
    Only removing the folder MyProspectsDashlet from my Prospects/Dashlets folder makes them come back

  2. #2
    SebastienBillard is offline Junior Member
    Join Date
    May 2009
    Posts
    4

    Default Re: My Prospects Dashlet

    Noone has any ideas? It seems like this should be pretty trivial, and yet I'm completely stumped.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Needed: Prospects Dashlet
    By mbuttrey01 in forum Classifieds
    Replies: 7
    Last Post: 2009-02-23, 01:45 PM
  2. Prospects
    By Niggy in forum Developer Help
    Replies: 6
    Last Post: 2008-11-14, 08:24 AM
  3. Replies: 0
    Last Post: 2008-08-20, 10:11 PM
  4. Dashlet option not appearing in Add Dashlet screen
    By lowJack01 in forum Developer Help
    Replies: 0
    Last Post: 2008-07-17, 07:30 PM
  5. Prospects on the tab bar
    By kbrill in forum Developer Help
    Replies: 3
    Last Post: 2007-01-28, 11:58 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
  •