We all are familiar with Sage CRM’s Reporting tool, which helps to give a clear picture of ongoing work in very efficient manner. Just like many other features of CRM, even Reporting tool has some of its inbuilt features such as various report output options, chart options, sorting or grouping of output data etc. Even a simple Date field when added in search criteria, gives multiple options to filter the data. But have you ever tried to limit the report filtration by applying a specific condition on this Date fields?
On adding a Date field in Report’s search criteria, Sage CRM provides multiple options like specific date, Between, Relative like Day, Week, Month, Quarter or Year as shown in below screenshot.
However one of our Client came up with a requirement wherein, he needed to restrict the Date values in report’s search criteria for a month or two. Since the Between option was already available, we decided to apply the restriction with the help of some scripting as below.
Program Files (x86)\Sage\CRM\Instance_Name\WWWRoot\js\custom
if(sReportName==”” || sReportName==”null” || sReportName==”undefined”)sReportName=””;
if(sReportName==”Your Report Name”)
var Start_FetchDate=new String($(“#FieldName_start”).val());
if(Start_FetchDate==”” || Start_FetchDate==”null” || Start_FetchDate==”undefined”)Start_FetchDate=””;
var End_FetchDate=new String($(“#FieldName_end”).val());
if(End_FetchDate==”” || End_FetchDate==”null” || End_FetchDate==”undefined”)End_FetchDate=””;
var date1 = new Date(Start_FetchDate1)
var date2 = new Date(End_FetchDate1)
var timeDiff = Math.abs(date2.getTime() – date1.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
alert(“Please select date range of one month.”)
3. Save the code and clear the browser cache files.
In this way you can now easily restrict the date field in Sage CRM as per the requirement like one month or two months etc.
Greytrix – a globally recognized and one of the oldest Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500 and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature and Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion ISV Partner for GUMU™ Sage X3 – Sage CRM integration also listed on Sage Marketplace.
For more information on our integration solutions, please contact us at email@example.com. We will be glad to assist you.