Book Image

SugarCRM Developer's Manual: Customize and extend SugarCRM

By : Dr Mark Alexander Bain
Book Image

SugarCRM Developer's Manual: Customize and extend SugarCRM

By: Dr Mark Alexander Bain

Overview of this book

<p>SugarCRM is the world's leading commercial open-source customer relationship management (CRM) software for companies of all sizes. SugarCRM easily adapts to any business environment by offering a more flexible, cost-effective alternative to proprietary applications. SugarCRM's open-source architecture allows companies to more easily customize and integrate customer-facing business processes in order to build and maintain more profitable relationships. SugarCRM offers several deployment options, including on-demand, on-premise and appliance-based solutions to suit customers' security, integration, and configuration needs. <br /><br />This book will help you to customize the SugarCRM code. You will get learn about the database and application architecture. The book provides you with a module development tutorial, showing the essential steps for hooking your module into the SugarCRM infrastructure. You will learn about common customizations that can be performed against the codebase.</p>
Table of Contents (16 chapters)
SugarCRM Developer's Manual
Credits
About the Author
About the Reviewers
Preface
Index

Creating other Field Types


We've seen how to create a drop-down field, both by using the Studio and manually, but you're probably wondering how to create other field types. Some (such as radio buttons) follow the same route as drop downs. Other types (such as dates) are simpler to create, since the process is the same except that you don't have to start by creating the drop-down box itself. So, if you want to create a date box (for instance) then go straight to the custom field editor:

From there on the process is exactly the same as creating the dropdown that we've already dealt with.

And if you're going to do this manually (using SQL) then you just need to know the data type—obviously in this case it would be date, so use an SQL insert query to do that:

insert into fields_meta_data
   (  id, 
      name, 
      label, 
      help, 
      custom_module, 
      data_type, 
      date_modified,
      mass_update
   )
values
   (   'Opportunitiessurv_start_c', 
      'surv_start_c', 
      ...