How to get started Developing with SuiteCRM

There is very little information out there on how to get started developing with SuiteCRM. This post aims to help point you in the right direction, nothing more.

A good place to start is

https://docs.suitecrm.com/developer

You can also look at SugarCRM development Guide: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5

I have a blog: http://sugarmods.co.uk/

SuiteCRM is a Fork of SugarCRM CE 6.5.x so at its core is the SugarCRM CE framework. Therefore any information out there that explains how to customise some aspect of SugarCRM CE is also relevant for SuiteCRM (for the most part).

For example if you wanted to create a custom action in a module you would create a custom controller and add your action in there:
https://developer.sugarcrm.com/2011/02/07/howto-creating-custom-controller-and-view-classes

https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/MVC/Controller/

Examples can be seen in the Projects module of SuiteCRM

Entirely custom Views can be added to modules and existing views can be modified:

https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/MVC/View/

If you wanted to add a global action to SuiteCRM you would probably want to create an entry point:
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Application_Framework/Entry_Points/Creating_Custom_Entry_Points/index.html

Of you could add it to the global utils:

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Extension_Framework/Extensions/Utils/#Overview

If you need to add custom JavaScript to a View: http://sugarmods.co.uk/adding-custom-javascript-to-a-view-in-sugarcrm/

There is also an extensive range of logic hooks that can be easily utilised :

Module Logic Hooks:

after_delete: Executes after a record is deleted.
after_relationship_add: Executes after a relationship has been added between two records.
after_relationship_delete: Executes after a relationship has been deleted between two records.
after_restore: Executes after a record is un-deleted.
after_retrieve: Executes after a record has been retrieved from the database.
after_save: Executes after a record is saved.
before_delete: Executes before a record is deleted.
before_relationship_add: Executes before a relationship has been added between two records.
before_relationship_delete: Executes before a relationship has been added between two records. before_restore: Executes before a record is un-deleted.
before_save: Executes before a record is saved.
handle_exception: Executes when an exception is thrown.
process_record: Executes when the record is being processed as a part of the ListView or subpanel list.

Example of how to create a Logic Hook: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/Logic_Hooks/Introduction

If you want to create a custom Scheduled Task check out: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Extension_Framework/Extensions/ScheduledTasks/

This is a great post on how to actually work with records within a custom module, action or logic hook using the sugar bean :

https://developer.sugarcrm.com/2012/03/23/howto-using-the-bean-instead-of-sql-all-the-time

How to work with the database and execute SQL queries:

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Application_Framework/Helper_Classes/DBManagerFactory/

Creating a Custom module:

Creating a custom module is fairly straightforward, the best place to start is “Module Builder” in the admin section of SuiteCRM. This will let you create and deploy a basic module. It provides a studio like drag and drop interface where you can add Fields and relationships to your new module. You will then be able to deploy the module straight into your SuiteCRM instance or export the module as an installable package. You cannot create any real custom functionality via module builder, its just basic modules that allow you add and delete records and relate them to existing modules.

However, this provides the perfect starting point for more complex modules which can then be enhanced with controllers, views, logic hooks as out lined above. The structure of the installable package will also show you how to create an installer for SuiteCRM. More info here: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/API/Application/Module_Loader/Package_Examples/

Other useful links:

https://www.sugaroutfitters.com/blog/how-to-add-buttons-to-views-in-sugarcrm
https://www.atcoresystems.com/?portfolio=sugarcrm-manifest-development-guide



And the ultimate repository of knowledge which has now been shut down by SugarCRM

https://web.archive.org/web/20150416100114/http://forums.sugarcrm.com/f6/

9 Likes

You may also want to turn on Developer Mode in the system settings.

This prevents caching while developing.

Admin > System Settings > Advanced > Developer Mode

We are a single point of contact service desk for POS. As the call center manager I am supposed to shape CRM to match our workflow and deliver those service requests to our freelance developer. I do not wish to waste anyone’s time because we are new to CRM and I assume we would be reinventing the wheel in many cases. In an effort to respect my dev what are the best resources for fleshed out, tested addons, for SuiteCRM(sugar)?

Specifically I have been trying to bring on board some sort of MOTD or bulletin board (maybe in the form of a dashlet) so all staff members get the same update at the beginning of their shift.

I am sure there are so many other productivity enhancements that would jump out at me were I able to source a list. However, diving into dev forums as a layman is boggling. Where can I find the enhancements you love? All your suggestions are appreciated.

@headdowntech

Check out the SuiteCRM Store, the add-ons are there, and they do go through a process to ensure their quality.

This store is a remake of the more complete SugarOutfitters store, making it specific to SuiteCRM. However, maybe the transition is still taking place and there might be somethings you find in SugsarOutfitters that are not yet in SuiteCRM Store, but do work with SuiteCRM. Ask the developers of each in case of doubt.

There is a dashlet in SuiteCRM called My Activity Stream that shows information on what’s happening in the system (so users can see signs of other user’s actions). You can “post” there something to be seen by all.

There are also dashlets that can be based on any web URL, so if you can just link your company’s news page there if you want.

1 Like

@headdowntech

yep as above: https://store.suitecrm.com/suitecrm-modules

2 Likes

Thanks @Andy for the great starting point for new suitecrm developers.

How I wish I can find this post 3 months ago!

1 Like

@andy

Hello am new to suitecrm, please how could I lunch a search into suitecrm from say a form that sends a conact number from my site (example I input a contact number in a form on my site hit enter and it launches suitecrm with that specific contact record of thephone number)

Thank you

I already solved it. whatever thank u. :cheer:

Hello,

Can you go into detail about how you fixed this problem. I am having the same one now. Thanks.

As these are notice not fatal error, what I did was hiding it. If anyone has got a better way to solve this, please share tho.

You can just hide it by turning off error reporting for notice by going to config.php and right after php open tag, add:

error_reporting(E_ALL & ~E_NOTICE);

You can reference to this…http://php.net/manual/en/function.error-reporting.php

Yeah, I can do that, but it doesn’t solve why the error is actually happening… I’m really disappointed no one is solving the root of the issue and just hiding the bug… I’ll see if I can get to the bottom of it… Thanks.

go to the php folder that you installed it, find the “error_reporting” in php.ini file and edit as following

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

update the SuiteCRM to latest version if the above code can’t solve.

Great guide, but I would update links that point to sugarcrm site since they no longer work. They removed the content from the site and moved it into the PDF guides instead.

Here are the PDF Guides:

https://support.sugarcrm.com/Documentation/Unsupported_Versions/Sugar_6.5/index.html

I also keep a copy of them in case eventually they are removed from the SugarCRM site.

1 Like

Hello!

Is there any “best practice” in deploying customized SuiteCRM using version control system (Mercurial, in our case)?
We’d like to arrange fast and reliable process of moving our custom modifications from test to production environment.

Detailed questions:

  1. Which files should be excluded from version control (configs etc)?
  2. How to process database schema changes? Is it enough to transfer new php files and make “quick restore”? If yes, are there any exceptions?
  3. Maybe there are other, better suited methods of achieving our goal?

We use SuiteCRM 7.10.10 + Mysql 5.7

Thanx in advance to anyone, who’d like to share experience :slight_smile: .

Hello,
I’m new to suitecrm. I started reading the official developer documentation but I’m looking for some bases or video tutorials or video courses for developers that introduce me to developing for suitecrm.
I read your first topic mami, I ask if it is still valid after almost three years? :slight_smile:
Thanks a lot.

Thanks this information helped.
I tried to create a new SuiteCRM Database user by choosing Define user. Enter the database username and password in the relevant fields. Re-enter the password to confirm it.
Performing a typical installation of SuiteCRM.
Select Typical Install.
Click Next.
Select the database that is installed in my system and click Next.
But it doesn’t help.
Any suggestions?
Regards,
Lewis

If you’re more into videos I recommend this free video unofficial SuiteCRM channel https://www.youtube.com/c/suiteCRMtutorials

DISCLAIMER: Made with great care and dedication by yours truly :slight_smile:

1 Like