Sage CRM 2021 R2: Customizing the Opportunity Pipeline Summary Information

Pipeline graphics
Can we customise the "Statistics for All stages" that appear next to the pipeline in My CRM / Opportunities?

The pipeline graphic and its associated statistics are driven from within the dll and have no definition within meta data. This means that we have no obvious way of changing the data.

Note:  The PipeLineGraphicBlock available in the .NET API and the COM API used in classic ASP pages only uses the Cylinder Pipeline style.  The PipeLineGraphicBlock and has the property pipe_summary which allows the contents of the summary area to be defined. The example ASP page usage would be:

myPipeline=eWare.GetBlock('pipeline');
myPipeline.Pipe_Summary='<TABLE><TD CLASS=TABLEHEAD>Negotiating Selected (70)</TD></TABLE>';


But in the system pages draw we are not able to access the pipe_summary property of the pipeline graphic as it is driven from the dll and not exposed to us.

We can however see that the current text in the pipeline summary area of the Opportunity Pipeline is translatable.

The text values of 'No. Oppos' and 'Forecast' can all be found in the custom_captions table and therefore changed in the Administration -> Customization -> Translations area.

Caption Family, Code, US Translation
ColNames, qry_avgcertainty, Average Certainty
ColNames, qry_avgdealvalue, Average Value
ColNames, qry_avgweighted, Weighted Average
ColNames, qry_Count, No. Oppos
ColNames, qry_sumforecast, Forecast
ColNames, qry_weightedForecast, Weighted Fcst

Also an examination of the SQL used to create the screen:

SELECT TOP 20 COUNT(*) AS Qry_Count, AVG(Capt_Order) AS Qry_Order, SUM((Oppo_Forecast/Curr_Rate) * 1.000000) AS Qry_SumForeCast, SUM(((Oppo_Forecast/Curr_Rate) * 1.000000)*Oppo_Certainty)/100 as Qry_WeightedForeCast, SUM(Oppo_Certainty) AS Qry_SumCertainty, Oppo_Stage AS Qry_Stage FROM vListOpportunity LEFT JOIN Custom_Captions ON Oppo_Stage = Capt_Code LEFT JOIN Currency ON Oppo_Forecast_CID = Curr_CurrencyID WHERE ((comp_secterr is null OR (comp_ChannelId=1) OR (Comp_PrimaryUserId=4) OR (comp_CreatedBy=4) OR (comp_secterr>=-2147483639 AND comp_secterr=-1610612729 AND comp_secterr;=-1610612729 AND oppo_secterr=-2147483639 AND oppo_secterr=-2147483639 AND pers_secterr=-1610612729 AND pers_secterr
)GROUP BY Oppo_Stage ORDER BY 2 DESC

Shows where the values of the existing contents of the summary area originates.

Another useful fact is that the Summary Area data values are actually treated like any other field data when the values are written out to the browser. This means that the field captions and the field data are wrapped in spans that have ids given to them. If you examine the HTML of the page you will see the summary fields have each section clearly identified:

e.g.

_CaptQry_Count>#text
_DataQry_Count>#text

This means that these area can be very easily addressed using client side code.

For example code like this could be placed into the custom content of the Opportunity List:

crm.ready(function () {
var strSpan = '';
var strLink = '';
strSpan = _DataQry_Count.innerHTML;
strLink = 'This is new:';
strLink += strSpan;
_DataQry_Count.innerHTML = strLink;
})


We can seen that the translations for the fields in the summary area can be changed and the addressable id's of the fields mean that it is easy to change the summary area of the Opportunity PipeLineGraphic.
Anonymous