Extending Sugar 7.1.5 Record View

Matthew Marum —  February 10, 2014 — 9 Comments

We often get asked how to extend the Record view in Sugar 7. The Record view in Sugar 7 is one of the more complex views in the application so extending it can be a little tricky.

The examples below are based on Sugar 7.1.5.

The first question I would ask is “are you overriding the Record view for a single module?”

In that case, then what you need can be accomplished using a single file. All you need to do is define your custom module Record view.  Create your new Record view under custom/modules/MODULE/clients/views/. This is fairly easy and upgrade safe.

If you needed to change all Record views then the next question I would ask is “are you just trying to add something to the Record layout?”

Adding a new view to the Record layout would be the (upgrade) safest way to add content to the base Record user interface in Sugar 7.


This is what Sugar 7 looks like when you have the files above dropped into your custom/ directory. Underscores in the file names above are used to denote subdirectories.

This gives you the freedom of having full control over your view without worrying about interactions with other components may also be trying to override the Record view.  It also keeps your customizations from being tightly coupled to the Record view so that it can be reused in more places in the user interface.

But if you really need to override the base Record view in Sugar 7 to accomplish your goals, here a recommended way to do it.


Try dropping the files above into your custom/ directory.  Underscores in the file names above are used to denote subdirectories.

This approach involves creating a custom Record view with a different name.  The new view controller extends Record view and configures it appropriately so that it pulls in all the original record metadata including actions and fields.  In the custom view metadata, it is setup so that it reuses the Handlebars template from the original Record view.  You can then define any custom HTML that you need within separate templates that get serialized to the client along with your custom view.

I hope that helps!  Let us know if you’ve got questions.

9 responses to Extending Sugar 7.1.5 Record View

    Fernando da Silva Trevisan February 10, 2014 at 11:22 am

    Am I missing something or the article is missing a image – the one that show how Sugar 7 will look like when you drop the files in the custom directory?

    Thanks for the post!


    When you say “drop the files”, you mean using a manifest I suppose… How do I just “drop” the files in sugaronemand?

    What happened to custom/Extension ? isn’t there anymore?

      Matthew Marum May 27, 2014 at 11:26 am

      Yes, for SugarOnDemand you would have to use a module loadable package.

      custom/Extension is still around. Support for using Extensions to extend Sidecar metadata was added in 7.2.0 with more enhancements planned.


    This just does not work at my end. Are you sure that you have given us the appropriate filenames & paths?

      Matthew Marum May 27, 2014 at 11:28 am

      If you are having problems getting this to work, make sure you have tried to use Quick Repair & Rebuild.


    it is works for me only for record view. how to add it to create view? Thanks.

Trackbacks and Pingbacks:

  1. Disable/Enable dropdown on change of another field | Rolustech Blog - April 29, 2014

    […] First we will need to extend and override record view controller. Record view can be extended following the guidelines in Extending Sugar7 Record View. […]

  2. We need your Sugar 7 Record view customization use cases! « SugarCRM Developer Blog - April 10, 2015

    […] Adding custom views to Record layout (Example from Sugar Developer Blog) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s