Sage CRM has a wide range of different gadget types that can be included in the Interactive Dashboard.

Below you can see that I have created a custom Dashboard which includes List Gadgets, Chart Gadgets and a Record Summary Gadget.  There is also a custom gadget in the top left of the dashboard.

This has been created by using a Website Gadget that references an ASP page running with in Sage CRM.

Dashboard -> Create New Web Site Gadget

In the Web Address field I added

#crm_server#/CustomPages/gadget1.asp

Note 1: #crm_server# is a special code that the Dashboard understands to refer to the current server.

Note 2: This is a static URL with no session or state information.  This means that we can not directly call the main CRM ASP API which depends on the Session and State information being included in the URL.

My file gadget1.asp page contained the following code:

<%@ CodePage=65001 Language=JavaScript%>
<%
function GetKeyValue(querystringname)
{
var strPathFull = String(Request.ServerVariables("HTTP_REFERER"));
var arrayPath = strPathFull.split("?");
var strPath = arrayPath[1];
var arrayKeys = strPath.split("&");
for (var i=0;i<arrayKeys.length;i++)
{
var arrayValue = arrayKeys[i].split("=");
if (arrayValue[0].toLowerCase()== querystringname.toLowerCase())
{
return arrayValue[1];
}
}
return "";
}
Response.Redirect("http://localhost/CRM2017/CustomPages/gadgetCustomSummary.asp?SID="+GetKeyValue("SID")+"&J=gadgetCustomSummary.asp&T=User&PopupWin=Y")
%>

Note 1: The HTTP_REFERER obtained using Request.ServerVariables("HTTP_REFERER") provides access to the originally calling URL of the Interactive Dashboard which includes Session and some state information.  The SIS (Session ID) is essential for security.

Note 2:  This page carries out a redirect to the target page.   Response.Redirect("http://[servername]/[instancename]/CustomPages/[targetpage]asp?SID="+GetKeyValue("SID")+"&J=[targetpage].asp&T=User&PopupWin=Y")

Note 3:  The &PopupWin=Y is needed otherwise it will draw all the menus in the new gadget.

gadgetCustomSummary.asp

As an example of a custom gadget this page displays the count of current 'In Progress' or 'Pending' Cases, Opportunities and Communications for the current user.

  

This particular gadget uses a simple HTTP meta tags to cause the page to refresh every 2 minutes.

The code can be found below.

<!-- #include file ="sagecrm.js"-->
<meta http-equiv="refresh" content="120">
<%
var intRecordId = CRM.GetContextInfo("user","user_userid");
var oppoRecord = CRM.FindRecord("opportunity", "oppo_status='In Progress' and oppo_assigneduserid=" + intRecordId);
var caseRecord = CRM.FindRecord("cases", "case_status='In Progress' and case_assigneduserid=" + intRecordId);
var commRecord = CRM.FindRecord("Communication, vCommunicationAll", "comm_status='Pending' and cmli_comm_userid=" + intRecordId);

var caseContent = CRM.GetBlock("content");
caseContent.contents = "<table width='250px' style='background-color: #C8006E'><tr>';
caseContent.contents += "<td width='55px'><img src='../Themes/Img/Ergonomic/Icons/case.png'></td><td class='TOPHEADING' style='color: white'>' + caseRecord.RecordCount+'</td>';
caseContent.contents += "</tr><tr><td>&nbsp;</td><td class='TOPCAPTION' style='color: white'>'+CRM.GetTrans('Tabnames','Cases')+'</td>';
caseContent.contents += "</tr></table>";
caseContent.Width = "100px";
caseContent.Height = "100px";

var oppoContent = CRM.GetBlock("content");
oppoContent.contents = "<table width='250px' style='background-color: #64006E'><tr>';
oppoContent.contents += "<td width='55px'><img src='../Themes/Img/Ergonomic/Icons/opportunity.png'></td><td class='TOPHEADING' style='color: white'>' + oppoRecord.RecordCount+'</td>';
oppoContent.contents += "</tr><tr><td>&nbsp;</td><td class='TOPCAPTION' style='color: white'>'+CRM.GetTrans('Tabnames','Opportunities')+'</td>';
oppoContent.contents += "</tr></table>";
oppoContent.Width = "100px";
oppoContent.Height = "100px";
oppoContent.NewLine = false;

var commContent = CRM.GetBlock("content");
commContent.contents = "<table width='250px' style='background-color: #004089'><tr>';
commContent.contents += "<td width='55px'><img src='../Themes/Img/Ergonomic/Icons/communication.png'></td><td class='TOPHEADING' style='color: white'>' + commRecord.RecordCount+'</td>';
commContent.contents += "</tr><tr><td>&nbsp;</td><td class='TOPCAPTION' style='color: white'>'+CRM.GetTrans('Tabnames','communications')+'</td>';
commContent.contents += "</tr></table>";
commContent.Width = "100px";
commContent.Height = "100px";
commContent.NewLine = true;

var myBlockContainer = CRM.GetBlock("Container");
with (myBlockContainer)
{
AddBlock(caseContent);
AddBlock(oppoContent);
AddBlock(commContent);
DisplayButton(Button_Default) = false;
}

CRM.AddContent(myBlockContainer.Execute());
Response.Write(CRM.GetPage());

%>