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(); } } ?>MyProspects.data.phpCode: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'); ?>
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


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks