How to modify the Preview View of the Intelligence Pane in SugarCRM Sidecar interface

A quick guide on how to modify the preview pane in Sugar sidecar

Previewing From List Views

When the user previews a record from the module list view, the intelligence pane will display the record\’s details with key information regarding the record as well as any related activity stream information.

By default, the code to display the preview view is found in:

  • clients/base/views/preview/preview.hbs
  • clients/base/views/preview/preview.js

If you take a look at the file ‘clients/base/views/preview/preview.js’, it is clear that this view is extended from the ‘RecordView’.

The load order of the view files are: 

So if you need to modify the Preview view of the Opportunities module, for example, the file ‘modules/Opportunities/clients/base/views/record/record.php’ will need to be overwritten in an upgrade-safe manner into the file ‘custom/modules/Opportunities/clients/base/views/record/record.php’

One practical example is to hide the Renewal field for instances that do not use the Renewal model:

  • Edit the file ‘custom/modules/Opportunities/clients/base/views/record/record.php’
  • Comment out / delete the reference to the field ‘Renewal’
  • Perform a Quick Repair and Rebuild under Admin > Repair

That’s it!

More reading: