Add a custom action in SugarCRM 7

Last Modified Date

(Updated on July 2021) 

[In 2020 SugarCRM 10 was released offering a wide array of new functionality. You can read up on the latest edition of SugarCRM: Sugar 10 here. The same process mentioned in this blog can be implemented in SugarCRM 10.] 

In SugarCRM 7, custom actions cannot be added for sidecar modules. You will need to create a layout and view for a custom action. To retrieve/save on that view/layout, a REST API call is used.

To setup a custom layout e.g ‘my-view’
create a php file ./custom/clients/base/layouts/setup/setup.php to render a custom view named “my-view”.


$viewdefs[‘base’][‘layout’][‘setup’] = array(
‘type’ => ‘simple’,
‘components’ => array(
‘view’ => ‘my-view’,

Creating a custom View:

A custom view helps render the content that is to be viewed. The javascript controller defines how the page should be rendered. This is defined in ‘ ./custom/clients/base/views/my-view/my-view.js ‘

className: ‘setup tcenter’,

loadData: function (options) {

A handlebars template is then created to show the result in ‘./custom/clients/base/views/my-view/my-view.hbs’

My View!!

To see your newly created layout and view, you will navigate to:

//{site url}/#/layout/setup

Custom API:
To generate the data required, we can create a custom REST API by extending Sugar 7’s REST API.

Rolustech is a Certified SugarCRM and Salesforce Partner firm taking pride in successfully implementing CRM Customization and Integrations for more than 600 firms worldwide. Get in touch for a Free CRM Consultation Session

Need Help? Get Free Consultation

By clicking you agree to our Terms and Conditions

Send me news and updates

Get in touch

Contact Information

Looking For a Job ?