Displaying a total at bottom of Opportunities listview in 7.10.5

In step One you don’t need to use focus as that has the limited records shown in the list view. Also remove the Hook from Process record as it will slow down the VIEW to show records if the Number of users are more. Having the Hook only for Step Two, Do something like below.

$myOpportunities = BeanFactory::getBean('Opportunities');
$allOpportunities = $myOpportunities->get_full_list('','status ="open"',false, 0);

if ($allOpportunities != null) {
foreach( $allOpportunities as $opportunity)
{
       self::$yourSum += $opportunity->probability_forecast_c;
}

The syntax/parameters for get_full_list Function is as below

get_full_list($order_by = "", $where = "", $check_dates=false,  $show_deleted = 0)
2 Likes