My Account | Internet Creations
Welcome, Guest.

Comparing Date & Date/Time fields when searching for duplicate cases


Case Merge Premium users may want to narrow down duplicate results based upon the date (or date/time) a case was Created, Closed or otherwise updated. For example, Neat Widgets LLC receives an abundance of cases from their customers often with the exact same (or very similar) email subject. When new cases are opened today, the Duplicate Detector is finding cases that are three weeks old. Neat Widgets LLC is looking for a way to narrow down the duplicate results to cases created in the same week. With the help of a simple formula field, Case Merge Premium can handle this business case with ease.


In order for Neat Widgets LLC to narrow down their Duplicate Detector results to cases opened in the same week, they'll need to perform the following steps.

1. Create a Checkbox Formula Field
  • For Lightning Experience users, Navigate to Setup | Object Manager | Case | Fields and Relationships | New.
  • For Salesforce Classic users, Navigate to Setup | Customize | Cases | Fields and Relationships | New.
    • Select Formula as the Data Type and click Next.
    • Provide a name for your field such as "Created in Last 7 Days", select Checkbox as the Formula Return Type and click Next.
    • For the Formula, please specify the following:
      • (TODAY() - DATEVALUE(CreatedDate)) <= 7
    • Click Next and proceed the remaining steps regarding Field Level Security & Page Layouts.
2. Adjust your Duplicate Criteria
  • Navigate to the Case Merge Premium Settings tab and select the Search Page tab.
  • Under the Duplicate Criteria section, click the link to open up the configuration page.
  • Remove the CreatedDate field from your criteria, select the field created in the prior steps.
  • Set the Operator to "equals" and the value to "TRUE".
  • Click Save, and you're all set!

User-added image

At this time, Case Merge Premium does not support the use of date functions such as "TODAY" and "LAST 7 DAYS" when configuring the default duplicate criteria. Administrators attempting to use these functions will encounter the following error:

User-added image

As a workaround, please follow the steps outlined above in regards to first creating a formula field on Case.

Please note, this KB article is provided as-is. Customization in regards to the creation of custom fields is not supported under the scope of support provided with the Case Merge Premium application. For further assistance, please contact your Salesforce administrator, Salesforce implementation partner, or your Internet Creations Account Executive to inquire about professional services.


Open a Case