Change List block title

By | March 11, 2012

Usually we come across some challenges while modifying Sage CRM as per customer’s requirements. Some modifications are achieved just by performing some simple changes in translations; however for few others scripting is required.  Recently I had a customization where I had to display a communication list in a custom page and display the same in the Case entity tab.

The requirement was also to display the title of this communication list as Internal Communications. One way we can achieve this is by performing changes in the translation. But these changes will change the title of entire communication list in CRM which we do not want.

The same was achieved through an onload script which changed the Communication list title to Internal Communications. The script is as given below.
< script for=window event=onload >
ChangeListTitle();
function ChangeListTitle()
{
var tblobj = document.getElementsByTagName(“TD”);
for(i=0;i<tblobj.length; i++)
{
if(tblobj[i].className == “PANEREPEAT”)
{
if(tblobj[i].innerText.indexOf(“Page 1”) >=0)
{
tblobj[i].innerText = tblobj[i].innerText.replace(“Communications”,”Internal Communications”);
}
}
}

}
< /script >