Hide Reports using jQuery in Sage CRM

By | July 24, 2017

Sage CRM helps to manage Customer’s critical Sales, Marketing and Service activities on daily basis. Whereas the Reports in Sage CRM helps us to view the statistics of data entered in CRM in order to monitor and get an idea about the past or ongoing work; mainly used by the Management staff of an organization. There are different categories available in CRM to view the reports of different entities. But what if you need to restrict or hide some reports which are irrelevant to the Business process?
New Stuff: Creating View in Sage X3 and make it accessible through Web Services
In this blog, we will see that how we can hide the report in CRM using jQuery.
Suppose, you want to hide “My Communications by Type” report from Communications Category.

Follow the below steps to hide the report.
1. Write the below code in the js file.
crm.ready(function()
{
RemoveReport();
});
function RemoveReport()
{
var TB=document.getElementsByClassName(“CONTENTGRID”);
if(TB)
{
$(“tr.reprow1″).each(function()
{
var sReport =new String($(this).text());
if(sReport==”” || sReport==”undefined” || sReport==”NULL”)sReport=””;
if(sReport!=””)
{
if(sReport.indexOf(“My Communications by Type”)>=0)
{
$(this).remove();
}
}
});
$(“tr.reprow2″).each(function()
{
var sReport =new String($(this).text());
if(sReport==”” || sReport==”undefined” || sReport==”NULL”)sReport=””;
if(sReport!=””)
{
if(sReport.indexOf(“My Communications by Type”)>=0)
{
$(this).remove();
}
}
});
}
}
2. Login to CRM.
3. Go to Reports -> Communications -> Call the JavaScript file in the filter screen available on the Reports Screen as mentioned below.

<script src=’../CustomPages/Customer/Reports.js’></SCRIPT>
4. Now, go to the Reports -> Communications. Remove the browser cookies and refresh the page. You can see that “My Communications by Type” report is now unseen.

Also Read:
1. Remove ‘All Report Categories’ option from Reports Menu
2. How to Remove Report Category from CRM?
3. Hiding Report Category for Specific Time
4. Display Distinctive Records in Reports
5. Restrict Inactive Companies & Contacts when Adding a New Case