How to add custom where class in sugar dashlets??? for example if you want to see top opportunities dashlet containing only filtered opportunities on some condition then you can do this as below require_once(‘modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.php’); class MyOpportunitiesCustomDashlet extends MyOpportunitiesDashlet { function MyOpportunitiesCustomDashlet($id, $def = null) { global $current_user, $app_strings, $dashletData; require(‘modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.data.php’); parent::MyOpportunitiesDashlet($id, $def); } function process($lvsParams = array()) { $lvsParams = array( ‘custom_select’ => ”, ‘custom_from’ => ”, ‘custom_where’ => ‘ AND opportunities.sales_stage=\’Qualification\”, ‘distinct’ => true ); parent::process($lvsParams); } } these codes are only hints, you should know where these piece of codes should be placed to be working..
Comments
Post a Comment