Changing the Default Screen Displayed when Accessing a Record from the RecentList (Sage CRM v7.1)

1 minute read time.

A customer had the requirement that when a Person was selected from the Sage CRM RecentList, as in the image below, the NotesList associated should be displayed rather than the Person Summary screen.

When the Person is selected from the RecentList

The Notes tab is displayed.

This is not customization that can done codelessly in the current Editions.

Some javascript code can easily be added to the main screen block used to create the Person Summary page.

The code needs to look for just the system call that comes the RecentList. This is so that when someone deliberately clicks on the Summary tab they actually see the summary screen and get redirected to the Notes tab.

The script below will detect the system action code (520) which is used to indicate that the call comes from the RecentList and it will then immediately load the URL for the Notes tab using the NotesList code (186).

var strSystemAction =  GetKeyValue("act");
var strMode =  GetKeyValue("mode");
var strSID =  GetKeyValue("SID");
//window.alert("Test:"+strSystemAction);
if (strSystemAction == 520)
{
//alert(strSystemAction +"/"+strMode);
var strTargetAction = "186"
var strCurrentPath = document.location.href;
var arrayContext = strCurrentPath.split('?');
var strDLLPath = arrayContext[0];
document.location.href= strDLLPath+'?SID='+strSID +"&act="+strTargetAction +GetKeys();
}
//////////////////////////////
function GetKeyValue(querystringname) 
{ 
var strPath = window.location.search.substring(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 ""; 
}