You are previewing SugarCRM Developer's Manual.
O'Reilly logo
SugarCRM Developer's Manual

Book Description

"

Learn the application and database architecture of this open-source CRM and develop and integrate your own modules and custom workflows

  • Learn to customize SugarCRM code

  • Develop modules from scratch

  • Learn database and application architecture

  • In Detail

    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.

    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.

    This is a developer's manual for SugarCRM. It focuses on customizing SugarCRM. It provides an overview of the architecture of the application and the database, and covers the essential steps for hooking your module into the SugarCRM infrastructure.

    "

    Table of Contents

    1. SugarCRM Developer's Manual
    2. Credits
    3. About the Author
    4. About the Reviewers
    5. Preface
      1. What This Book Covers
      2. Who is This Book for
      3. Conventions
      4. Reader Feedback
      5. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Questions
    6. 1. Stamping Your Own Brand on SugarCRM
      1. Before We Start...
      2. Customizing SugarCRM URL
        1. Changing the SugarCRM URL in Windows
        2. Changing the SugarCRM URL in Linux
      3. Customizing SugarCRM Tabs
        1. Re-name the SugarCRM Tabs
        2. The SugarCRM Custom Directory
        3. Customizing the Text within SugarCRM Tab Screens
        4. Changing the Browser Title
        5. Adding a Company Logo
      4. Customizing SugarCRM Themes
        1. Creating a New Theme
        2. Removing a Theme
      5. Summary
    7. 2. Customizing the SugarCRM Application Content
      1. A Note About Terminology
      2. Changing the About Screen
        1. Changing the About Screen into a Help Screen
      3. Controlling the Visible Tabs
        1. User Control
        2. Administrator Control
          1. A Note about Administering Live Systems
      4. Adding a Custom Tab
        1. Custom Tab Contents
      5. User-Controlled Dashlet Customization
      6. Customizing Dashlets
        1. Creating Custom Dashlets
        2. Making Dashlets Accessible to Users
      7. Summary
    8. 3. Introducing Custom Fields
      1. Adding a Custom Field
        1. The Standard Module Tab
        2. The General Process for Creating a Custom Dropdown
        3. Using Studio to Create a Drop-down Box
        4. Manually Adding a Drop-down Box
        5. Using Studio to Create a Custom Field
        6. Creating the Custom Field Manually
        7. Adding the Dropdown to a Module Tab
          1. Adding Rows
        8. Recovering Previous Versions of a Layout
        9. Manually Modifying Layouts
      2. Including Custom Fields in Mass Updates
        1. Making Sure that Your Changes are Visible
        2. Limitations of the Mass Update
        3. Adding Built-in SugarCRM Fields to the Mass Update
      3. Creating other Field Types
        1. Field Data Types
      4. Summary
    9. 4. Interfacing with SugarCRM
      1. What Have we Learned so Far?
        1. The Include Directory
        2. The Custom Directory
        3. The Themes Directory
        4. The Modules Directory
      2. Overview of the SugarCRM Application Architecture
      3. The SugarCRM User Interface
        1. Calling Modules
      4. SugarBean—The SugarCRM Data Interface
        1. The SugarBean Files
          1. vardefs.php
          2. vardefs On-line Documentation
          3. vardefs Field Types
          4. The Complete vardefs File
          5. The <module>.php File
      5. SugarBean in Action&mdash;SugarCRM's Logic Hooks
        1. The End Result of Using the Logic Hook
      6. Summary
    10. 5. SugarCRM Database Schematics
      1. Database Schematic Diagrams
        1. Access Control List
        2. Accounts
        3. Bugs
        4. Calls
        5. Campaigns
        6. Cases
        7. Contacts
        8. Documents
        9. Emails
        10. Email Management
        11. Leads
        12. Meetings
        13. Opportunities
        14. Projects
        15. Project Tasks
        16. Prospects
        17. Schedulers
        18. Users
      2. Differences Between Versions 4.5.0 and 4.5.1
      3. Summary
    11. 6. SugarCRM Data Dictionary
      1. Differences between Versions 4.5.0 and 4.5.1
      2. SugarCRM Table Definitions
        1. Accounts
        2. accounts_audit
        3. accounts_bugs
        4. accounts_cases
        5. accounts_contacts
        6. accounts_opportunities
        7. acl_actions
        8. acl_roles
        9. acl_roles_actions
        10. acl_roles_users
        11. Bugs
        12. bugs_audit
        13. Calls
        14. calls_contacts
        15. calls_users
        16. campaign_log
        17. campaign_trkrs
        18. Campaigns
        19. campaigns_audit
        20. Cases
        21. cases_audit
        22. cases_bugs
        23. Config
        24. Contacts
        25. contacts_audit
        26. contacts_bugs
        27. contacts_cases
        28. contacts_users
        29. Currencies
        30. custom_fields
        31. Dashboards
        32. document_revisions
        33. Documents
        34. email_marketing
        35. email_marketing_prospect_lists
        36. email_templates
        37. emailman
        38. Emails
        39. emails_accounts
        40. emails_bugs
        41. emails_cases
        42. emails_contacts
        43. emails_leads
        44. emails_opportunities
        45. emails_project_tasks
        46. emails_projects
        47. emails_prospects
        48. emails_tasks
        49. emails_users
        50. Feeds
        51. fields_meta_data
        52. Files
        53. iframes
        54. import_maps
        55. inbound_email
        56. inbound_email_autoreply
        57. Leads
        58. leads_audit
        59. linked_documents
        60. Meetings
        61. meetings_contacts
        62. meetings_users
        63. Notes
        64. Opportunities
        65. opportunities_audit
        66. opportunities_contacts
        67. Project
        68. project_relation
        69. project_task
        70. project_task_audit
        71. prospect_list_campaigns
        72. prospect_lists
        73. prospect_lists_prospects
        74. Prospects
        75. Relationships
        76. Releases
        77. Roles
        78. roles_modules
        79. roles_users
        80. saved_search
        81. Schedulers
        82. schedulers_times
        83. Tasks
        84. Tracker
        85. upgrade_history
        86. user_preferences
        87. Users
        88. users_feeds
        89. users_last_import
        90. users_signatures
        91. vcals
        92. Versions
      3. Summary
    12. 7. Development and Testing Strategies for SugarCRM
      1. Why Use Development and Testing Strategies?
      2. The Unbreakable Rule:Thou Shalt Not Do Any Development on a Live Server
      3. Setting up a Development Server
        1. Creating a Server
          1. Installing Software
          2. Setting the Server's IP Address
        2. Migrating SugarCRM Files and Databases Between Servers
          1. Setting Up the Export on Server 1
          2. Setting Up a Mount Point on Server 2
          3. Migrating Files from Server 1 to Server 2
      4. An Example Upgrade
        1. Upgrading PHP
        2. Upgrading SugarCRM
          1. Comparing Database Files
          2. Migrating Database Files
          3. Comparing and Migrating the SugarCRM Application Files
      5. Testing SugarCRM
      6. Releasing Your Customizations
      7. Summary
    13. 8. Developing Your Own Modules
      1. Adding Third-party Modules
      2. Creating Custom Modules
        1. A (Very) Basic Module
        2. Data for the New Module
        3. Processing Data in the Module
          1. Adding More Data
        4. Adding Shortcuts
        5. Using language/en_us.lang.php
        6. Tables for the Module
      3. Advanced Modules
        1. The Initial Setup
        2. The Module's Data Schema&mdash;vardefs.php
        3. The Module's Business Object
          1. Registering the Business Object
        4. The Module's Language File
        5. The Module's List View
          1. Selecting the Fields to be Displayed
          2. Creating the List View
          3. Making the List View the Default View
        6. The Modules Edit View
          1. The EditView.php File
          2. The EditView.html File
          3. The Module's Save File
        7. Creating New Reports
      4. Summary
    14. 9. Developing a Custom Workflow within SugarCRM
      1. A Very Simple Workflow
        1. Setting up the Process Stages
        2. Deciding Who Does What
        3. Introducing Business Rules
        4. Completing the Automated Workflow
      2. Moving the Rules into the Database
        1. Add a Custom Table
        2. Create the Workflow Module
          1. Building a Data Input Module
          2. Making Use of the Rules in the Database
      3. Parallel Tasks
        1. Adding Dependent Tasks to the Database
        2. Using Dependent Tasks in the Workflow
      4. Summary
    15. 10. Customizing and Optimizing SugarCRM&mdash;Tips and Tricks
      1. Delving into SugarCRM Variables
      2. Developing Dashlets Further
      3. Speeding up SugarCRM
        1. Optimizing Queries
          1. Using the explain Command
          2. Creating Indexes
          3. Logging Slow Queries
          4. Using the MySQL Query Cache
        2. Optimizing the SugarCRM Application
          1. The SugarCRM Diagnostic Tool
          2. Using phpinfo
          3. Install a PHP Optimizer
      4. Creating Reports
        1. Obtaining OpenOffice.org
        2. Accessing the Database Remotely
          1. Allowing Connections to the Database
          2. Creating an Account for Remote Access
        3. Setting Up the ODBC Connection
        4. Accessing the Data Through OOo Base
          1. Creating Queries
          2. Creating the Report
      5. Summary