I am creating a default homepage for my users. Among other things, the homepage will have two instances of the "My Leads" dashlet. One instance will show "open/new leads created in the past 30 days". (I can't remember if it's part of some previous customization or if it's built in to Sugar, but I already have the "in the past 30 days" logic.) The second instance will show "unconverted leads that were created more then 30 days ago". (Again, I already have the ">30 days" filter).
So far I have been able to force the homepage to show the two instances of the Leads dashlet, and I can get those instances to have different titles and displayed columns. The code is in custom\modules\Home\index.php and looks like this:
I can't figure out how to specify which filter criteria each of the dashlets should be using. If I wanted to have the same filters on both of them I think I could change something in the dashlet.data.php file, but then both instances of the dashlet would filter on the same criteria.PHP Code:$dashlets[create_guid()] = array('className' => 'MyLeadsDashlet',
'module' => 'Leads',
'forceColumn' => 0,
'fileLocation' => $dashletsFiles['MyLeadsDashlet']['file'],
'options' => array('title' => translate('OPEN LEADS created in the last 30 days','Leads'),
'displayColumns' => array('account_name',
'name',
'title',
'phone_work')
));
$dashlets[create_guid()] = array('className' => 'MyLeadsDashlet',
'module' => 'Leads',
'forceColumn' => 1,
'fileLocation' => $dashletsFiles['MyLeadsDashlet']['file'],
'options' => array('title' => translate('UNCONVERTED LEADS created >30 days ago','Leads'),
'displayColumns' => array('date_entered',
'account_name',
'name',
'phone_work')
));
Can somebody tell me what the code looks like that can specify the filters on a per-dashlet basis? I've been thinking it would be in an "options" section but so far I haven't figured out exactly what the syntax might be.
Thanks.
marc


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks