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


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks