SugarCRM: Adding custom fields in custom module without using studio

Tuesday, May 19, 2009 Posted by Md. Monjurul Hasan
SugarCRM is really handy using studio. Otherwise, Its giving me pain. Currently I am using SugarCRM version 5.0.0f.

I am trying to merge my changes from development CRM to main CRM without using studio. For this I need to add the custom fields,relations and change the current view (EditView, DetailView, ListView and SearchPanels) since I have modified it.

Lets c guys what I have done in the meantime.

  1. Added two database modulename_cstm and fields_meta_data and dump them from my dev crm database.
    if you have already these database, then just insert the new entries.

  2. For custom relationship, created a metadata file (module1module2MetaData.php) in sugarcrm/metadata dir and included that file in two files of custom directory.
    custom/application/Ext/Include/modules.ext.php and
    custom/Extension/application/Ext/TableDictionary/modulename.php

  3. Created an entry in following files
    custom/Extension/modules/ModuleName/Ext/Layoutdefs/modulename.php
    custom/Extension/modules/ModuleName/Ext/Vardefs/modulename.php

  4. Created folder in custom/Extension/modules/ same as other module [name it as your related module]
    watch out Layout and Vardef file in that directory

  5. Change in files modules/ModuleName/Ext/Vardef and modules/ModuleName/Ext/Layout if necessary

  6. Label of the fields should be present in custom/modules/ModuleName/language/en_us.lang.php

  7. New viewdefs files should be present at custom/modules/ModuleName/metadata/

  8. Do not forget to quick repair and rebuild from sugar admin


After all these works, I have found my changes merged and working, but the studio views are still like previous. So I am working on it.

Cheers!
Labels: