SugarCRM
Launch of CRMState.com
This month we launched CRMState.com a service that specializes in monitoring SugarCRM. There is a vast assortment of server monitoring solutions available but we ( Atcore Systems ) wanted to utilize our knowledge of SugarCRM to build a monitoring system that is application specific. The fact is that I can choose 1 of hundreds of server monitoring tools to monitor my server but none of them are SugarCRM aware. They don’t know the application, the features and all of the additional non standard types of monitoring and suggestions that can take place to enhance the software.
In version 1 we changed up the standard monitoring and instead of monitoring for the page to respond we verify that specific words show up on the login page. This insures that not only the server and database are up but that the page is showing as it should. It is in our roadmap to take on page checks to another level but we will talk about that in our next update.
Another monitor feature we added was fatal log alerting. Fatals shouldn’t happen very often, except in certain scenarios, if your SugarCRM instance is healthy. We monitor for fatals and alert the user based on their alert configuration. This may seem somewhat standard for a logging system but we have plan to take it much further in the near future.
Perhaps the biggest impact this has in relation to SugarCRM monitoring is that the service specializes in SugarCRM monitoring. With that focus we can continuously add SugarCRM specific checks, build in suggestions and keep up with the pace of SugarCRM releases.
Factors for Choosing a CRM
As a SugarCRM consultant ( for SugarCRM partners ) and avid Twitter user I find that there is a common question that all companies ask when looking for a CRM. That question is, what CRM is right for my company?
Being a SugarCRM consultant I would love to tell you that you should pick SugarCRM every time but that is just not the case. Each CRM on the market has many similarities and differences that should be thoroughly assessed before choosing. Below are a points that need to be taken into consideration before making a decision. They are in no particular order.
Determine your budget:
Analyzing your budget will quickly knock out many vendors. If your company has less than 20 employees and a low CRM budget then you can probably dismiss going with certain solutions.
Look at vendor minimums:
Some vendors have minimums on the number of seats that have to be purchased for certain solutions or product features levels. It is important to cross check the number of seats your are purchasing with the product feature level that your company needs.
On-Site or Off-Site:
Determining if your CRM will be hosted on or off site is a very important factor for both budgeting reasons and in planning for the future. Keep in mind that on-site does not have to actually mean at your physical location, it simply means that you have access to the software and can install it wherever you like.
Certain CRM vendors are Saas only solutions which means that if they don’t have a robust API then you could have trouble doing any integrations or automation in the future.
Some vendors offer both deployment options but their on-demand ( Saas ) option is crippled and doesn’t provide root level access to make changes. For you this means that you need to ask about access permissions and module loading permissions when making an on-site, on-demand decision.
Technical Ability:
Whether or not you have a full time technical resource can be a big factor in choosing a CRM. Having a technical resource to correct issues and implement light or even heavy customizations means that you have the potential to fully leverage your purchase.
If you don’t have a technical resource then looking at a more basic Saas CRM solution may be a better choice. Another opiton is to hire consultants that can provide these services if your budget allows.
Integrations:
Integrations into other systems enable CRM software to automate processes saving precious time and money. However, if you do not have the budget or are not planning an integration for the foreseeable future then your company may be able to pick a less expensive CRM option.
There is myriad of other questions that I ask when helping a customer choose a CRM package that is right for them. The goal is to take all possible factors into account before choosing, do your research, and when possible run pilot programs before going with a solution.
April Atlanta SugarCRM Meetup
April’s Atlanta SugarCRM Meetup was titled Building SugarCRM Modules for Fun and Profit. Using the slides below I guided attendees through the various decisions that have to made when deciding to build a module to make money versus building modules to give away on SugarForge. I used the recent creation of GetSocial Twitter Pro as an outline for things that module creators could run into.
Overall it was a great Meetup in a new time and location. Although the presentation was intended to be more about building modules than GetSocial Twitter Pro, we ended up discussing various ways to better promote the GetSocial Twitter Pro module.
There was a lot of great feedback and I want to thank all of the attendees for offering your thoughts. I also want to thank SugarCRM for hosting.
Open Source: Contribution Based Upgrades
After being heavily involved in the SugarCRM community and the communities of other open source software over the years, there is one thing that has started to really bother me. In the BitTorrent world we call them leechers. These are the people who take and never seem to give back to the cause.
The problem that I have with this is that people are continuously leveraging others hard work while many times refusing to pay for anything attached to it. After download the platform they get the free modules, then they want consulting and haggle about the rates trying to make a point that the software was free stating “why would I spend so much on consulting when the platform came at such a little cost”. Lets face it, peoples time deserves compensation.
In building WapSnap and GetSocial Twitter Pro I thought long and hard on how to give to the community without rewarding the leechers. This leads to the idea presented in the title, “Contribution Based Upgrades.”
The concept is that the software is open source but to get the upgrade packages you need to contribute. This concept isn’t without it’s hurdles but we will get to that next.
Here is how it works. First off the software creator will require the user to sign up to download ( Even though I hate this concept ). During that process they will be told that they will not receive upgrades without contributions. The software provider will maintain a portal with a forum, documents area, and any other content sections needed to support the software which can take contributions from users. When a user posts any content, they will get points from the system or other community members with minimum and maximum points allowed based on the type of contribution.
The catch is that they must maintain a certain level of contribution averaged over time to have access to the upgrade packages. The level doesn’t have to be high but the fact that they have to contribute in some way is a step in the right direction. Maybe they could even get extra points for external blogs posts, who knows.
Now for the problems.
1. First is that current licensing of open source software will allow one person to download and distribute the upgrade packages without any recourse. Not that you want to go after users but you do need a “leg to stand on” if needed. To fix this you will have to draft your own license agreement.
2. Since the system is points based you will have to make sure that people aren’t gaming the system. This will probably be a constant battle for an active project but as long as your cover the majority of issues it shouldn’t be a huge problem.
3. People posting garbage. If people continuously post garbage to maintain there status the community will usually report it. If not, the moderator can troll for garbage and take it to the curb.
I’m am sure that there are dozens of other issues that could arise but at least the list is started.
In theory, this would greatly enhance the project quality and allow users to give time back to those who so graciously gave to them. I am interested in your thoughts on contribution based upgrades so send them to me or make a comment.
SugarCRM: A Short Guide to Installation on Windows
The first thing that most potential users of SugarCRM want to do is try the software out for themselves. The options are to download SugarCRM CE ( Community Edition ) and install it on a system that you have available or to sign up for a Pro (SugarCRM Professional ) trial and wait for the sales people to call. If you are going to need the feature set provided in SugarCRM Pro for your business then you should definately sign up for the trial and play with the same edition that you will be implementing. If your plans are to go with SugarCRM CE then this post will help you get up and running.
The first step to getting SugarCRM installed on Windows is to fulfill the requirements of running the software. These requirements include a web server such as Apache or IIS, PHP, and various other modules never mentioned in the installation and administration guide. This all sounds really complicated if you have never installed a webserver but there are a few software packages that make it very easy.
When it comes to installing a webserver with the packages required for SugarCRM there are mulitple options.
1. SugarCRM FastStack – The SugarCRM FastStack installs everything that is needed including SugarCRM CE. The only drawback that I see from the FastStack is that it is not widely used for any other types of software installation so if you need help then the only place that you can go to is the SugarCRM forum. This isn’t a big deal except that most of the knowledgable people in the forum don’t use the FastStack on their own machine and may not be as helpful as they could be had you chosen a different installer.
2. Apache2Triad – Apache2Triad is similar to the FastStack except that it is made by a group that is dedicated to giving users of any web based software package a good experience. Another difference is that SugarCRM is not bundled so you will have download it.
3. XAMPP – XAMPP by Apache Friends is what I use on my Windows system simply because it provides an easy to use interface along with a few built in tools that I like to use while working on SugarCRM. Just like the other two packages it is easy to install and provides all of the necessary package for SugarCRM installation.
You are welcome to try any of the packages because they are all provided free of charge. I am going to move forward and tell you how to get SugarCRM installed on XAMPP.
Step 1. Download XAMPP from ApacheFriends.org – This quick tutorial assumes that you download the full version and not XAMPP lite.
Step 2. Download SugarCRM
Step 3. Install XAMPP by double clicking the installer that you downloaded. I recommend keeping all of the defaults and the tutorial will assume that you did.
Step 4. Once you install XAMPP you will need to change to lines in a file called php.ini. Go to the following directory c:\xampp\apache\bin and open php.ini.
Step 5. Find the line that says “memory_limit” change the limit from the default number to read memory_limit = 64M. This will give SugarCRM enough memory so that you don’t get errors during installation.
Step 6. Find the line that says “upload_max_filesize” change the limit from the default to read upload_max_fiilesize = 32M.
The memory that I have alotted in Step 5 and 6 are not the minimums that SugarCRM can run on so keep in mind that they can be set lower if you are installing to an older system.
Step 7. Save the file and restart the server. This can be done by going to Start -> Programs -> Apache Friends and opening the control panel. If both Apache and MySQL both have a green box next to them that says running then click to Stop Apache. Once it Stops, click Start again so that it will pick up your new settings.
Step 8. Unzip all of the files from the SugarCRM zip file and move them to the c:\xampp\htdocs\sugarcrm directory. The sugarcrm directory will not exist so you will have to create it.
Step 9. Once this has been complated you are ready to install SugarCRM. You start the installation by opening your browser and going to http://localhost/sugarcrm
Step 10. Follow the steps that SugarCRM guides you through to install the software. When you are at the database step you will want to set the database server to localhost and use the default XAMPP databases username and password which is username: root with no password.
If all is done correctly then at the end you will have a working version of SugarCRM that you can play with. If you follow this short guide and get hung up on a step then leave a comment and I can add it in for other users so that they too can get SugarCRM up and running quickly.
SugarCRM: Where Are Global Email Settings Stored?
While working on the GetSocial Twitter Pro module I had to add settings in the admin area that were stored in the database. The problem was that I didn’t know where the settings were getting stored. The module that I was modeling my section after in the first iteration was the EmailMan module which stored most of its data in the emailman table.
I new that the global email settings were not stored in the emailman table based on the data that I entered and what I viewed in the table at the time. I also knew that I could have started debugging but it would have taken a while to comb through all the lines of code or to even pick a good breakpoint. Instead, again, WapSnap came to my rescue. I did a snapshot, changed the email settings, did a snapshot and then compared.
This immediately showed that the only thing that changed in my SugarCRM instance was the config table in the database. I opened up phpMyAdmin, looked at the config table and found where many of the global settings were stored.
SugarCRM: Adding Custom Settings to the Admin Area
Recently my GetSocial Twitter and GetSocial Twitter4Contacts modules started gaining traction on Blogs and in the Twitterverse. The more people that downloaded them the more requests I received for features and updates.
One feature that I knew was needed was the ability to configure the company account credentials in the Administration area of SugarCRM. This is where the research began.
I have made plenty of custom modules that when clicked show the list view and allow the addition of records. I have also customized these modules. However, adding areas to the Admin section that when clicked shows one screen with two fields that saves custom configuration variables was very different.
To see the functionality I am speaking of you can simply go to Admin -> License Settings or view the screenshot below.
I first started to create this area by trying to duplicate the functionality in the Email Settings. Email Settings actually uses the EmailMan module which has a standard module structure that manages the email Queue and a config section which holds the email settings. This means that when you click Admin -> Email Settings you go to EmailMan with the Config action ( index.php?module=EmailMan&action=config ). When you click Admin->Manage Email Queue you get the index action ( index.php?module=EmailMan&action=index ) and the Queue view
I duplicated this functionality to discover that it really wasn’t what I was looking for. I only wanted the functionality that was shown when the config action was called. Searching for a way to not create a full module that I didn’t need along with a config section I found the Licence Settings.
The license settings area works a little differently, it calls the Administration module and the LicenseSettings action ( index.php?module=Administration&action=LicenseSettings ). This functionality is driven by two essential files LicenseSettings.php and LicenseSettings.html under Modules/Administration. The fields that are filled out in this area get populated in the config table in the database.
The first step was to copy those files and to use them as a template to create the functionality that I needed. Once copied, I renamed them to the same name that would be called with the action which was TweetCreds. After changing the names I stripped out all of the LicenseSettings fields and added my two fields for filling in Twitter credentials.
The real issue came when I wanted to save my new fields. At first the field names where TWEETACCOUNT and TWEETPASSWORD and no matter what I did my fields would not get saved. More debugging and digging lead me to the Save.php file in the Administration module. In this file there is a foreach loop that loops through all of the POST parameters.
[code]
foreach ($_POST as $key => $val) {
$prefix = $focus->get_config_prefix($key);
if (in_array($prefix[0], $focus->config_categories)) {
if ( $prefix[0] == "license" )
{
if ( $prefix[1] == "expire_date" )
{
global $timedate;
$val = $timedate->swap_formats( $val, $timedate->get_date_format(), $timedate->dbDayFormat );
}
else
if ( $prefix[1] == "key" )
{
$val = trim($val); // bug 16860 tyoung - trim whitespace from the start and end of the licence key value
}
}
$focus->saveSetting($prefix[0], $prefix[1], $val);
}
}
[/code]
I could see that my parameters were making it this far but the loop wasn’t inserting them into the config table as expected. This leads me to the main takeaway item from this blog entry. You can’t just add fields with any name to be saved by this function. They have to follow a specific structure.
The structure that they have to follow is <Category>_<Name> . The category and name is what will get stored in the config tables first two columns ( Category, Name ). The third column ( Value ) hold the value of the variable. Once I figured this out and changed the fields to read TWEETCREDS_ACCOUNT and TWEETCREDS_PASSWORD. This still won’t work until you add the category name ( TWEETCREDS ) to the $config_categories array in Administrator.php. This is also used by the foreach loop to do matching and to sure that the POST is not a throwaway value or a value used for some other action.
So as you can see, the naming scheme is very important when adding custom values to the config table and custom sections to the admin area.
I hope that this was a helpful post that will act as a partial guide that will assist you in adding your own custom admin sections with ease. Feel from to post and questions that you may have and I will try to provide an answer.
SugarCRM: A Deeper Look into Module Builder
For many standard SugarCRM users Module Builder is a black box that pops out custom modules as needed. But behind the scenes it is a complex code generator that builds every file and database that SugarCRM requires to create additional functionality. For those standard users it is a helpful tool that requires no PHP or SugarCRM architecture knowledge. For the SugarCRM developer, Module Builder just leads to more questions. The core question be, what all does it change and create?
SugarCRM Module Builder is part of the reason that I started building WapSnap. I needed an easier way to analyze what happens behind the scenes from a higher level than a debugger. Today with the WapSnap prototype I was able to take my first steps into easily detecting what Module Builder was doing when I hit the deploy button. Lets take a look at the first set of results.
For this analysis I created a package called test and a within that package a module called Books.
The Files
WapSnap detected that only 1 file was changed from before the deployment. That file was understandably the sugarcrm.log file.
Most of the work that Module Builder did was to create 56 new files, most of which fell into the custom/modulebuilder directory. A list of these files can be found at the end of this post.
A quick glance at the list of files will also show that most of the files in custom/modulebuilder are further broken down into two more core folders which are packages and builds. I plan to do further analysis but my first guess is that everything in packages is what will be used if a user chooses to Export or Publish the module. The builds folder is probably what is use by SugarCRM when the new module is deployed and used. But that info is yet to be verified.
The Database
Although most of the changes where made in the file structure, SugarCRM still depends heavily on information from the database. With the creation of this new module, WapSnap detected changes to 6 database tables and the creation of two new tables.
The tables that were changed where as follows:
acl_actions
config
relationships
upgrade_history
tracker
versions
The two new tables was, predictably, a table for the Books data and a table for the books audit trail which were as follows:
test_books
test_books_audit
The two table changes that I found interesting from the list are config and relationships. Mainly because I would like to see what config data gets added/changed/removed and because we didn’t add any relationships.
Once WapSnap moves into Beta we hope to be able to give you more in depth information about quickly detecting line by line files changes and filed by field database changes. Until then, feel free to deploy a module and use this file list for further analysis.
Files Created
/custom/themes/default/images/test_Books.gif
/custom/themes/default/images/icon_test_Books_32.gif
/custom/themes/default/images/icon_Test_Books.gif
/custom/themes/default/images/Createtest_Books.gif
/custom/modulebuilder/packages/test/modules/Books/vardefs.php /custom/modulebuilder/packages/test/modules/Books/metadata/subpanels/default.php
/custom/modulebuilder/packages/test/modules/Books/relationships.php
/custom/modulebuilder/packages/test/modules/Books/metadata/SearchFields.php
/custom/modulebuilder/packages/test/modules/Books/metadata/sidecreateviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/searchdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/popupdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/metafiles.php
/custom/modulebuilder/packages/test/modules/Books/metadata/listviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/editviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/detailviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/metadata/dashletviewdefs.php
/custom/modulebuilder/packages/test/modules/Books/language/en_us.lang.php
/custom/modulebuilder/packages/test/modules/Books/Dashlets/test_BooksDashlet/test_BooksDashlet.php
/custom/modulebuilder/packages/test/modules/Books/Dashlets/test_BooksDashlet/test_BooksDashlet.meta.php
/custom/modulebuilder/packages/test/modules/Books/config.php /custom/modulebuilder/packages/test/manifest.php
/custom/modulebuilder/packages/test/language/application/en_us.lang.php /custom/modulebuilder/packages/test/icons/icon_test_Books_32.gif
/custom/modulebuilder/packages/test/icons/test_Books.gif
/custom/modulebuilder/packages/test/icons/Createtest_Books.gif /custom/modulebuilder/packages/test/icons/icon_Test_Books.gif /custom/modulebuilder/builds/test/SugarModules/modules/test_Books/vardefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/test_Books_sugar.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/test_Books.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/subpanels/default.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/studio.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/sidecreateviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/SearchFields.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/searchdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/popupdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/metafiles.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/listviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/editviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/detailviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/metadata/dashletviewdefs.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/language/en_us.lang.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Forms.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Dashlets/test_BooksDashlet/test_BooksDashlet.php
/custom/modulebuilder/builds/test/SugarModules/modules/test_Books/Dashlets/test_BooksDashlet/test_BooksDashlet.meta.php
/custom/modulebuilder/builds/test/manifest.php
/custom/modulebuilder/builds/test/SugarModules/language/application/en_us.lang.php
/custom/modulebuilder/builds/test/LICENSE.txt
/custom/modulebuilder/builds/test/icons/default/images/test_Books.gif
/custom/modulebuilder/builds/test/icons/default/images/icon_test_Books_32.gif
/custom/modulebuilder/builds/test/icons/default/images/icon_Test_Books.gif
/custom/modulebuilder/builds/test/icons/default/images/Createtest_Books.gif
/custom/history/modulebuilder/packages/test/modules/Books/metadata/editviewdefs.php_1238005625
/custom/Extension/application/Ext/Language/en_us.test.php
/custom/Extension/application/Ext/Include/test.php
/custom/application/Ext/Include/modules.ext.php
/custom/application/Ext/Language/en_us.lang.ext.php
An Introduction to WapSnap
I have been actively Tweeting about WapSnap and speaking to various individuals about what it does. Today I determined that it was time for a proper introduction.
WapSnap meet world, world meet WapSnap.
Many of the intricacies about WapSnap‘s product positioning are still in limbo. For now all that I can say is that it is a web based snaphsot and comparison utility that will compare both files, and databases to detect changes. Most peoples first response has been, “doesn’t Git and SVN do that already?” My answer is, yes but only for the files.
The file comparison will be similar to a WinMerge and other comparison utilities like those built into Git. Where I would really like to differentiate is in the database comparison and manipulation area. WapSnap will be able to compare databases all the way down to the field level in order to detect changes in applications. This leads to why I started building WapSnap.
Although others and myself attempt to use best practices when developing applications, sometimes developers end up working on the production box instead of doing an update from their favorite repository. This increases the risk of error and possibility of breaking production applications. The first response to this is to restore backups and risk losing data entered since the last backup. The alternative to backups is to track down the issue and try to fix it as quickly as possible. If you try to fix it the question will become, what all was changed? This is where WapSnap comes in. If you snapshot both the files and database before the changes are implemented then you narrow the search area to check for errors.
This becomes even more helpful for those using open source applications like Joomla and SugarCRM. Through many discussions I have found that users of open source applications commonly work on production instances because it is easier, cheaper, faster, and the applications take plugins or modules that most think work out of the box and won’t break their system. Yet another example of WapSnap‘s handiness is when someone installs a module, it breaks their app, then they uninstall and the app is still broken. WapSnap will easily let you detect the crumbs left behind in the file system and database so that they can be removed in less time that of what is needed to do a large restoration from backup.
Another huge benefit is that you learn more about the application. Take SugarCRM for instance, does anyone really know everything that happens behind the the scene we you use the Module Builder to build and deploy a custom module? Most people on the SugarCRM forums don’t and neither do I, most just speculate and build on past knowledge to guess what it is doing. The same goes for deploying 3rd party modules in any application.
Last but not least, where in the world does WapSnap comes from. I needed a name for a project that I was working on that took snapshots of web applications so I decided on W-Web, AP-Application, SNAP – Snapshot. Nothing special but it is staying until I come up with something better or decide to stick with it.
If you know of other tools that are helpful that have similar functionality please comment and let me know.
SugarCRM Atlanta Meetup – Tips, Tricks, and Tools
At the February 20th SugarCRM Atlanta Meetup hosted by Dave Gearhart and myself, we discussed tips, tricks, and tools around SugarCRM. The presentation was mostly a compilation of a few recent blog posts that I have done including SugarCRM: Import Wizard Tips and SugarCRM: New User Tips. The tools section was made up of the typical who’s who of Firefox developer plugins with an additional plug for a recent project of mine called WapSnap. The plug was mostly because the utility was started specifically to alleviate some pains in SugarCRM development that I and others seem to be having. Event Slides:
SugarCRM Consulting
Categories
JoshSweeney Twitter
- No public Twitter messages.


