Partner SugarCRM

Technical Guides on SugarCRM

How to Customize SugarCRM to Provide Control over Data Input

HowAuthor: Alexey Yaroshenko, Software Engineer

One of the criteria of data quality with a CRM system is completeness. Unfortunately, sometimes users ignore proper data input, which leads to negative consequences, such as inability to find important data when it is needed, as well as time expenditure for updating incomplete data. All these issues can be avoided, providing control over data input by a user. Let’s have a good look how to customize SugarCRM to achieve it (by the example of partitioning the field with a phone number into 3 segments).

It is known that a phone number in an international format contains a country code, network prefix and a phone number. In order to provide input of all components, the following logic should be implemented: filling in one field all other fields should become required.

How to Customize SugarCRM to Control Data Input

Have the same challenges or need to solve your specific tasks within SugarCRM?

Discuss your need with our experts!
 

After the record is saved phone numbers editing is performed in a standard format.

Solution:

We create a px-phone custom field. We add px-phone.js and empty.hbs files to the folder custom/clients/base/fields/px-phone.

We place the following code to the px-phone.js file:

In method _pxPerformEmptyTplRequiredOperations we connect our template from the file empty.hbs and register the checks:

In order to have correct presentation of validation error message, we need to redefine the method:

Control over Data Input to SugarCRM: Phone number 2

For the filed to be presented in such format, we need to indicate its “px-phone” type in metadata:

Advantages of such SugarCRM customization:

  • Such implementation allows fast functionality enabling/disabling
  • All functionality of standard fields of phone type is available

Disadvantages of such SugarCRM development:

  • Implementation only for record and create views

Room for improvement:

The major area for improvement is the implementation of the functionality for list-views.

Conclusions:

Due customization of SugarCRM data input control mechanism, the risk of inputting incomplete data by a user, vanishes. Moreover, in case of necessity, such SugarCRM development allows immediate enabling and disabling of the enhancement.

By the way, if you want to get our advice when it comes to SugarCRM customization, you may address your issue to our experts.

Other instructions on SugarCRM development:

Leave a Reply

Your email address will not be published. Required fields are marked *