Results 1 to 5 of 5

Thread: How to Code a New Module and integrate it with open source sugar crm

  1. #1
    rohitdsouza is offline Sugar Community Member
    Join Date
    Mar 2006
    Location
    india
    Posts
    35

    Lightbulb How to Code a New Module and integrate it with open source sugar crm

    hello people

    well i want to know how can i integrate my own new module in open source sugar crm.In which files i will have to change what.
    do help me guys
    -rohit d'souza

  2. #2
    AbhishekKatiyars is offline Sugar Community Member
    Join Date
    Aug 2005
    Posts
    62

    Default Re: How to Code a New Module and integrate it with open source sugar crm

    Quote Originally Posted by rohitdsouza
    hello people

    well i want to know how can i integrate my own new module in open source sugar crm.In which files i will have to change what.
    do help me guys
    -rohit d'souza
    Hi Rohit,

    Here are the few steps to add new module and files you required to change, hope this helps you.

    1. Open index.php, you can find this file here –

    /SugarSuite-Full-4.0.1/index.php

    2. Then add the module name under $app_list_strings[’record_type_module’]

    $app_list_strings[’record_type_module’] = array(
    ‘Contact’ =’Contacts’,
    ‘Account’ = ‘Accounts’,
    ‘Opportunity’='Opportunities’,
    ‘Case’ =’Cases’,
    ‘Note’ =’Notes’,
    ‘Call’ =’Calls’,
    ‘Email’ =’Emails’,
    ‘Meeting’='Meetings’,
    ‘Task’ =’Tasks’,
    ‘Lead’ =’Leads’,
    ‘Bug’ =’Bugs’,
    ‘Contract’=’ Contract ‘, (I am Adding Contract as new module)
    );

    3. Then open next file called modules.php, you can find this file here

    /SugarSuite-Full-4.0.1/include/modules.php

    4. Include the module name under $moduleList = array(); , this list defines the modules shown in the top tab list of the application.

    The order of this list is the default order displayed - do not change the order unless it is on purpose like this

    $moduleList[] = ‘Home’;
    $moduleList[] = ‘iFrames’;
    $moduleList[] = ‘Calendar’;
    $moduleList[] = ‘Activities’;
    $moduleList[] = ‘Contacts’;
    $moduleList[] = ‘Accounts’;
    $moduleList[] = ‘Leads’;
    $moduleList[] = ‘Opportunities’;
    $moduleList[] = ‘ Contract ‘;

    5. Then define the module name under $beanList = array(); ,this list defines all of the module names and bean names in the application

    To create a new module’s bean class, add the bean definition here $beanList = array(); like this

    $beanList[’Employees’] = ‘Employee’;
    $beanList[’Currencies’] = ‘Currency’;
    $beanList[’Trackers’] = ‘Tracker’;
    $beanList[’Import’] = ‘ImportMap’;
    $beanList[’Import_1′] = ‘SugarFile’;
    $beanList[’Import_2′] = ‘UsersLastImport’;
    $beanList[’Versions’] = ‘Version’;
    $beanList[’Administration’] = ‘Administration’;
    $beanList[’ Contract ‘] = ‘ Contract ‘;


    In Case of further doubt please refer this page - http://sugarcrm.openapp.org/?p=14

  3. #3
    swhitlow's Avatar
    swhitlow is offline Sugar Community Member
    Join Date
    Jun 2005
    Location
    Indianapolis, IN.
    Posts
    204

    Arrow Re: How to Code a New Module and integrate it with open source sugar crm

    Also, if you go to SugarCubed website they have a growing list of tutorials that look pretty good. I would check them out.

    http://sugarcubed.multi.com/
    Scott Whitlow
    Lead Software Engineer/SugarCRM Developer
    swhitlow at gmail.com
    Indianapolis, IN. USA

  4. #4
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: How to Code a New Module and integrate it with open source sugar crm

    Desperate to wrap my tiny brain around the development and implementation of custom modules, attempting to follow or trace the steps outlined below I cannot help but notice that upon successful install of the Songs module, "songs" does not appear in any form under either /SugarSuite-Full-4.0.1/index.php, OR /SugarSuite-Full-4.0.1/include/modules.php.
    Somebody elucidate me, PLEASE!!!!! Custom modules for dummies anyone?

    Quote Originally Posted by AbhishekKatiyars
    Hi Rohit,

    Here are the few steps to add new module and files you required to change, hope this helps you.

    1. Open index.php, you can find this file here –

    /SugarSuite-Full-4.0.1/index.php

    2. Then add the module name under $app_list_strings[’record_type_module’]

    $app_list_strings[’record_type_module’] = array(
    ‘Contact’ =’Contacts’,
    ‘Account’ = ‘Accounts’,
    ‘Opportunity’='Opportunities’,
    ‘Case’ =’Cases’,
    ‘Note’ =’Notes’,
    ‘Call’ =’Calls’,
    ‘Email’ =’Emails’,
    ‘Meeting’='Meetings’,
    ‘Task’ =’Tasks’,
    ‘Lead’ =’Leads’,
    ‘Bug’ =’Bugs’,
    ‘Contract’=’ Contract ‘, (I am Adding Contract as new module)
    );

    3. Then open next file called modules.php, you can find this file here

    /SugarSuite-Full-4.0.1/include/modules.php

    4. Include the module name under $moduleList = array(); , this list defines the modules shown in the top tab list of the application.

    The order of this list is the default order displayed - do not change the order unless it is on purpose like this

    $moduleList[] = ‘Home’;
    $moduleList[] = ‘iFrames’;
    $moduleList[] = ‘Calendar’;
    $moduleList[] = ‘Activities’;
    $moduleList[] = ‘Contacts’;
    $moduleList[] = ‘Accounts’;
    $moduleList[] = ‘Leads’;
    $moduleList[] = ‘Opportunities’;
    $moduleList[] = ‘ Contract ‘;

    5. Then define the module name under $beanList = array(); ,this list defines all of the module names and bean names in the application

    To create a new module’s bean class, add the bean definition here $beanList = array(); like this

    $beanList[’Employees’] = ‘Employee’;
    $beanList[’Currencies’] = ‘Currency’;
    $beanList[’Trackers’] = ‘Tracker’;
    $beanList[’Import’] = ‘ImportMap’;
    $beanList[’Import_1′] = ‘SugarFile’;
    $beanList[’Import_2′] = ‘UsersLastImport’;
    $beanList[’Versions’] = ‘Version’;
    $beanList[’Administration’] = ‘Administration’;
    $beanList[’ Contract ‘] = ‘ Contract ‘;


    In Case of further doubt please refer this page - http://sugarcrm.openapp.org/?p=14

  5. #5
    frb
    frb is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    79

    Default Re: How to Code a New Module and integrate it with open source sugar crm

    Songs has been implemented using as much external includes as possible, a lot of those can be found under custom... I'm currently also reviewing/understanding what "installing Songs" actually does.
    NB: the install of Songs did not complete correctly on my side, the app_list_str'ings was not updated on 4.0.1c (I add to edit the file mentioned above directly)... apart from that it was ok though.

    The above step by step is modifying standard files which will add merge issues when new releases.patches come in. It's good to understand how standard modules work though... and is probably also a good first step to know which global variables have to be adapted to add a new module. step 2 is to limit changes to standard files to the minimum, there are quite a few hooks already The last lines of most common files usually contain things like if file_exist (custom/XXX) include custom/XXX.

    eg: end of include/modules.php

    if (file_exists('include/modules_override.php'))
    {
    include('include/modules_override.php');
    }
    if (file_exists('custom/application/Ext/Include/modules.ext.php'))
    {
    include('custom/application/Ext/Include/modules.ext.php');
    }
    ?>

    Rgs,

    Franck
    Last edited by frb; 2006-03-28 at 09:56 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •