CRM, Blog

Adding the Case Summary Dashlet to Custom Modules

Intricity

Intricity

April 2, 2015

Screen-Shot-2015-10-29-at-9.38.40-AM-450x222

If you're familiar with SugarCRM version 7.x, you have probably seen the Case Summary dashlet on the Account's module that displays a chart to show you Open/Closed cases related to an Account record separated out by status.

Screen Shot 2015-10-29 at 9.22.39 AM

We recently customized the Cases module by adding additional relationships to other custom modules that relate to a Case. Our customer wanted to be able to see this dashlet on those custom module so users can also see how many Cases these records have.

In order to do this customization, you will need to do the following:

  1. Create a new folder in the custom/clients/base/views directory. In our scenario, we created a folder called customer-cases.
  2. Copy the files within the clients/base/views/casesummary directory and paste them into your folder your created in step 1. There will be 3 files here that need to be copied over (JS, PHP, and HBS file extensions).
  3. Rename the files you pasted into your directory to match the folder name you created in step 1.
  4. Open up the JS file and look for the following line within the code. This code will be near the end of the file.Screen Shot 2015-10-29 at 9.29.42 AM
  5. You should see a reference to the account_id field, the Accounts module, and the Cases module. These 3 references will need to be updated to point to your custom module you want this dashlet to be available for as well as the relationship and relationship id names between that module and the Cases module. Below is what our code update for our customer-cases looks like.
    Screen Shot 2015-10-29 at 9.32.39 AM
  6. Now open up the PHP file in your folder.
    Screen Shot 2015-10-29 at 9.33.32 AM
    You'll need to modify a few lines within this definition. Update the ['casesummary'] and replace the casesummary with your folder name you created in step 1. Update your Label if you want the Dashlet title to be something different than the default. The last thing here you will need to update is the filter module definition. Change this from Accounts to your custom module.
  7. Run a Repair/Rebuild on your instance and make sure the cache directory is cleared out.
  8. Navigate to your custom module you want to display the dashlet on and within the side panel of a record, add a new Dashboard to the panel. You should now see your Case Summary dashlet available to choose from. Select the Dashlet from the view.
    Screen Shot 2015-10-29 at 9.37.34 AM
  9. You should now have the dashlet displaying and showing the current records relationship to open/closed cases!
    Screen Shot 2015-10-29 at 9.38.40 AM
 

Related Post

Ness Digital Engineering Acquires Intricity

Ness Digital Engineering Acquires Intricity - a New York based company specializing in data strategy, governance, modernization, and monetization

Learn More

The Narrow Case for Data-to-Information Company Acquisitions

The rumors about Salesforce acquiring Informatica bring up some interesting observations from past acquisitions of this nature.

Learn More

New Video: Modern center of excellence

Now more than ever, organizations need to stabilize and optimize their primary use cases to manage costs effectively, maximize technology, and foster a culture of innovation and efficiency.

Watch Now