It is no secret that I am a big fan of the ease of which the SugarCRM framework facilitates a number of customizations.
A few months back I shared a simple example that demonstrated said simplicity quite well through a customization of the search popup windows. Let us take a look at another equally simple and useful modification.
This time around we are going to look at something just as easy, but serving a completely different purpose.
In this scenario we will assume that we have a need to create a read-only field, one that cannot be edited via the SugarCRM interface. This is helpful for scenarios where records may contain important data that should not be changed by any user. A good example of this is financial data from external systems, such as your ERP solution.
Because this data is coming from another system, it is usually input into SugarCRM by means of a link or other programmatic approach that eliminates the need for the user to actually enter the data by editing the record.
Allowing users to manipulate the values would create the potential for faulty analysis. For example, if one of the values relates to a customer's outstanding balance, a user could accidentally (or purposely) increase or decrease it, in turn misleading the next person that views said record. Hence the value of using a read-only field.
Converting a field into a read-only field is quite simple. Read on to see the step-by-step instructions.
Friday, June 4, 2010
Monday, May 3, 2010
Database Administration via SugarCRM Framework
Recently I found myself in a situation that required me to delete a large amount of records from a SugarCRM database. More to the point, I needed to delete all the account and contact records.
Under normal circumstances, the task would have been rather simple. One approach that would normally work would be to simply select all the records via the ListView and then delete the records. A second -- and faster --- approach would be to simply truncate the table via a MySQL database administration tool such as SQLyog or phpMyAdmin.
Notice I stated "normal circumstances."
My scenario was such that the environment hosting the SugarCRM instance in question did not allow me to select all the records and then delete them. Due to number of records that needed to be processed (over 70K), the system tended to time out and fail. Smaller batches was simply not going to work as it was taking a minute or more to process 200 contacts. At that pace, it would have taken me hours to delete the entire batch of records just in one module.
You may be wondering why I even bothered with the ListView when the SQLyog/phpMyAdmin option would have been far easier and faster. The answer is actually equally simple. Much like many other hosting providers, this one in particular does not provide a means for connecting directly to the database via external tools. It is further complicated by the fact that similar tools could not be installed -- nor were available -- on the server, nor was I able to access the file system.
I am stuck, right?
Well, not quite. After giving it some thought for a few minutes, I realized I could manipulate the SugarCRM framework to get it to do what I needed, although it is not really designed for the task I had in mind.
Let us take a look at how I solved this particular problem.
Notice I stated "normal circumstances."
My scenario was such that the environment hosting the SugarCRM instance in question did not allow me to select all the records and then delete them. Due to number of records that needed to be processed (over 70K), the system tended to time out and fail. Smaller batches was simply not going to work as it was taking a minute or more to process 200 contacts. At that pace, it would have taken me hours to delete the entire batch of records just in one module.
You may be wondering why I even bothered with the ListView when the SQLyog/phpMyAdmin option would have been far easier and faster. The answer is actually equally simple. Much like many other hosting providers, this one in particular does not provide a means for connecting directly to the database via external tools. It is further complicated by the fact that similar tools could not be installed -- nor were available -- on the server, nor was I able to access the file system.
I am stuck, right?
Well, not quite. After giving it some thought for a few minutes, I realized I could manipulate the SugarCRM framework to get it to do what I needed, although it is not really designed for the task I had in mind.
Let us take a look at how I solved this particular problem.
Tuesday, April 27, 2010
SugarCRM Troubleshooting: IMAP Connectivity
You may have read my previous post from a few months ago where I discuss a potential scenario that may keep you from being able to use the SugarCRM email client for IMAP accounts that require SSL.
While troubleshooting similar connectivity issues, I have found it helpful to use some PHP scripts to perform the basics of verifying that the server is actually capable of connecting to the mail server.
Assuming we cannot connect through the scripts, it would make sense that we would also not be able to connect via SugarCRM.
Some of the common reasons for not being able to connect include:
- Firewall restrictions
- Missing PHP extensions (e.g. IMAP)
- Incorrect account information
Should any of those (or other) conditions exist, the scripts will fail and you know you need to look elsewhere for your solution, instead of within SugarCRM.
Subscribe to:
Posts (Atom)