Best Practices for Customizing Sugar

by Valentin Bratulescu on December 12, 2018

We are strong advocates of making your CRM instance your own. Adding integrations, customizing modules and installing custom add-ons are just a few ways to make Sugar feel like it's been designed specifically for your business.

In this blog post, we'll take a look at how Matt Marum, Director of Product Management at SugarCRM, customized Sugar for a fictitious school of coders.

Professor M's School for Gifted Coders is a module-loadable package that can be installed in Sugar. Professor M is based on a popular character in the superhero world, who uses Sugar to manage his school. Professor M (aka Professor Marum) has created an exclusive non-profit school for gifted coders.

Professor M's School of Gifted Coders sigil

The Professor’s School is gathering the best and brightest to train them to battle against the forces of evil (specifically, bad customer experiences and poor project implementations). It is hazardous and demanding work.

The school has deployed Sugar as a platform to help them manage both students and faculty so they can focus on their core organizational goals of developing talented coders and being a force for good.

High-Level Use Cases

Professor’s M School uses Sugar for the following high-level use cases:

  • Managing applicants, current students, former students, and professors
  • Tracking super groups (groups of coders)
  • Soliciting donations from alumni and alumni affiliated super groups

Here is how you would name and use the modules of your Sugar instance if you were Professor M:

Professor M Module

Sugar Module

Description

Super Groups

Accounts

Super groups are organizations of affiliated coders.

Applicants

Leads 

Applicants are prospective students that need to be accepted or rejected.

Students

Contacts

Students are coders who have been admitted to the Professor M School.

Donations

Opportunities

Donations are opportunities to raise funds as charitable contributions.

Funding Line Items

Revenue Line Items

Charitable contributions broken down by line item.

Professors

Custom person-type module

School staff that helps Professor M teach student coders.

Prerequisites

These are the prerequisites necessary to install this package:

  • Sugar 7.9.1.0 (or newer) installed with NO sample data.         
    • Note: If Sugar is installed using config_si.php, it needs to be sure that the disable_unknown_platforms property is set to false or is not in the file.
    • Note for Windows users: The path to the Sugar instance has to be as short as possible to avoid errors of file paths being too long.
  • installed

Install the Modules and Customizations

Here is how you can install this Sugar package:

  1. Download the appropriate zip file from the latest Github repository release. Get the production version of the package if you’re installing it on Sugar Cloud. Otherwise, download the standard or production release file. Note that the standard release includes automated testing files too.
  2. Login to Sugar as an Administrator
  3. Navigate to Administration > Module Loader
  4. Upload the zip file
  5. Click Install for the ProfessorM package
  6. Review and accept the license agreement
  7. Click Commit
    • Note for Windows users: If you receive the warning message "Full extraction path exceed MAXPATHLEN (260)...", try doing the following:
      • Download the archive from the latest Github release.
        Professor M's School for Gifted Coders - Gitlab project for Sugar
      • Install the zip as a module loadable package using the steps above.
      • Download sugarcrm-ProfessorM-windows-manual-install.zip from the latest release.
      • Unzip the file. It includes a Readme file and a set of folders. If there are no folders in the zip, then all file paths in the package/src folder have been deemed short enough to be included in a typical Windows installation, and the zips need to be generated locally on your machine.
      • Open ProfMForWindowsReadme.txt and follow the instructions to manually copy the files from the zip to the Sugar instance. You may need to create the appropriate folders in you instance if they do not already exist.
      • Navigate to Administration > Repair > Quick Repair and Rebuild.
    • If the above installation still fails due to a MAXPATHLEN error, try manually generating the zips locally.

Choose Which Modules to Display

After installing the package, you should choose which modules you want to display.By default, Sugar displays most of the modules in your instance. To make things simpler, you can hide any modules you are not planning on using extensively, and rearrange the rest based on your needs.

  1. Login to Sugar as an Administrator
  2. Go to Administration > Display Modules and Subpanels
    Choose which Sugar modules to hide or display in Studio.
  3. Drag any modules you don’t need to use in the Hidden Modules section
  4. Rearrange the items in the Displayed Modules based on their importance in your Sugar instance
  5. Click Save

Using the Sugar REST API to Create the Professor M Sample Data

To create the Professor M sample data, you can use Postman to run a collection of Sugar REST API calls. Each call in the collection has one or more simple tests associated with it to ensure the call was successful.

  1. Save a copy of ProfessorM_PostmanCollection.json
  2. In Postman, click Import
  3. Click Choose Files and import ProfessorM_PostmanCollection.json
  4. Click the gear icon in the upper right corner and select Manage Environments
  5. Click Add
  6. Input a name for your environment (for example, Professor M)
  7. Add the following keys and values:          
  8. url: the url of the Sugar installation (for example, http://localhost:8888/profm)
    • rest_endpoint: /rest/v10
    • username: the username for an admin user in the Sugar instance
    • password: the password associated with the username above
  9. Click Add
  10. Close the Manage Environments dialog
  11. Click Runner
  12. Select the ProfessorM Sample Data collection
  13. Ensure the newly created environment is selected
  14. Click Run
  15. Wait for the collection to finish running. All tests should pass.

For Sugar Enterprise and Ultimate editions, you can use the features that leverage Advanced Workflow. A good point is to save a copy of ProfessorM_PostmanCollection_AdvancedWorkflow.json and follow the steps above to import the collection and run it.

Setting Up Your Development Environment

To generate the Professor M module loadable packages or update the code, you will need to set up a development environment. This is not required if you’re just planning to install the Professor M package as is.

  1. Checkout or download a copy of this repository.
  2. Install PHP 7.
  3. Install Composer. Composer is used to install the PHP dependencies for the project.
  4. Execute the following command from the school/package folder in order to install the dependencies:
    • composer install

You should now be ready to customize Professor M’s School for Gifted Coders package how you see fit and carry the School of Gifted Coders legacy. We hope you enjoyed our walkthrough for customizing your Sugar instance from a coder’s perspective. We certainly enjoyed the subject presented by Matt Marum at SugarCon 2018 in Las Vegas.

If you would like to customize your Sugar instance to fit your business like a glove, don't hesitate to contact us today!

LEARN MORE ABOUT SUGARCRM

Find similar articles in these categories:

PRODUCT: SugarCRM

AUDIENCES: Administrators Developers

Trustpilot