Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Import/export contact fields

  1. #1
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Import/export contact fields

    Hi there, I use SugarCRM for Databases. Is there a way I can export and import into other databases, contact fields? By that I mean the fields you can create for contacts? Is there a way?

    Thanks.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Import/export contact fields

    Try using the Export option within Studio.

    Another option would be to create a custom manifest.php file with the proper instructions detailing the fields you wish to create.

    BTW, I am assuming you are talking about copying the structure, not the data.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Re: Import/export contact fields

    Yes I am talking about the fields that you can create for contacts. As for your "studio" export option... I'm looking but I can't find it.

    Also what do you mean when you want me to "create a custom manifest.php file with the proper instructions detailing the fields you wish to create. "?

    Thanks.

  4. #4
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Import/export contact fields

    When one initially opens Studio, there is an Export button right in the center of the screen. I don't know of any way of hiding it, so I couldn't tell you why it is not there if you are not seeing it.

    The only reason that comes to mind is that you might be using an older version of Sugar that did not yet include that feature.

    As for the custom manifest.php, take a look at the CaseTwit project (link in my signature) and unzip the contents. It contains a custom manifest.php file that has instructions on creating a custom field via the module loader. You could use that as a basis for the work you want to do.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  5. #5
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Re: Import/export contact fields

    I'll stick to working the manifest.php file.

    Code:
    	'custom_fields' => array(
    						array(
    						   'name'            => 'tweet_update',
    						   'label'           => 'Tweet Update', 
    						   'type'            => 'bool',
    						   'max_size'        =>  255,
    						   'require_option'  => 'optional', 
    						   'default_value'   => '0', 
    						   'ext1'            => ' ',
    						   'ext2'            => 'Cases',
    						   'ext3'            => ' ',
    						   'audited'         => 0, 
    						   'module'          => 'Cases',
    						 ),
    		),
    This looks promising... how would I run this and it would create a custome field?

  6. #6
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Import/export contact fields

    You need to package it in a module install package, similar to the CaseTwit example I pointed you to. Once you've got the package ready, you would use the Module Loader tool in the Admin control panel to load and execute it.

    Check out http://developer.sugarcrm.com and http://www.sugarcrm.com/wiki for more details on how a manifest.php file works.

    EDIT: I should forewarn you that when I made that file, the resulting field was always set as "required" although I explicitly defined it as optional. Seemed like a bug to me. I am not sure if it was fixed as I haven't had a chance to test it again and that manifest.php was originally developed for 5.2
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  7. #7
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Re: Import/export contact fields

    I tried uploading the .zip file of CaseTwit on Module loader and I got
    "The uploaded file is not compatible with this version of Sugar: 5.5.1PHP Notice: Undefined index: uploads_dir in C:\websites\agencysandbox.com\www\_sites\agencies\ NBA\database\cache\upload\upgrades\temp\168.tmp\ma nifest.php on line 20 "
    and line 20 is
    $upload_dir = $sugar_config['uploads_dir'];

  8. #8
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Re: Import/export contact fields

    OK I got manifest working... how od I specify which fields to create the custom field for? I want to create custom fields for Contacts?

    Here is my manifest...
    Code:
    <?php
    $manifest = array(
    	'acceptable_sugar_versions' => array('5.0', '5.1', '5.2', '5.5'),
    	'acceptable_sugar_flavors' => array('CE', 'PRO', 'ENT'),
    	'readme' => '',
    	'key' => 'ndops',
    	'author' => 'Dan Jasnowski',
    	'description' => 'Installs custom CMT Fields for iBoomerang agencies.',
    	'icon' => '',
    	'is_uninstallable' => true,
    	'name' => 'Custom CMT Fields',
    	'published_date' => 'May 24, 2010',
    	'type' => 'module',
    	'version' => '1.0',
    	'remove_tables' => 'prompt',
    );
    $installdefs = array(
    	'id' => 'ndops_dtk',
    	'language' => array(
    		array(
    			'from'=> '<basepath>/SugarModules/language/application.en_us.lang.php',
    			'to_module'=> 'application',
    			'language'=>'en_us',
    		),
    		array(
    			'from'=> '<basepath>/SugarModules/language/application.pt_br.lang.php',
    			'to_module'=> 'application',
    			'language'=>'pt_br',
    		),
    	),
    	'custom_fields' => array(
    						array(
    						   'name'            => 'testing_field',
    						   'label'           => 'Just a Test', 
    						   'type'            => 'textfield',
    						   'max_size'        =>  30,
    						   'require_option'  => 'optional', 
    						   'default_value'   => '0', 
    						   'ext1'            => ' ',
    						   'ext2'            => '',
    						   'ext3'            => ' ',
    						   'audited'         => 0, 
    						   'module'          => 'Cases',
    						 ),
    		),				
    );
    ?>
    On the last part for the custom field... there is a field called "module". and it has "Cases"... what should I do with that?

  9. #9
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Import/export contact fields

    Take a look at the value of ext2 in the snippet from the manifest that you posted earlier. That defines the module you wish to affect.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  10. #10
    jsfdan is offline Member
    Join Date
    May 2010
    Posts
    9

    Default Re: Import/export contact fields

    Oh, so beside ext2... I put 'Contacts'... right?

    (Although, I don't know why you'd put 'Contact's in ext1 instead of ext2, but OK.)

    Thanks.
    =====================================

    OK so I have this in my manifest.php:
    Code:
    <?php
    $manifest = array(
    	'acceptable_sugar_versions' => array('5.0', '5.1', '5.2', '5.5'),
    	'acceptable_sugar_flavors' => array('CE', 'PRO', 'ENT'),
    	'readme' => '',
    	'key' => 'ndops',
    	'author' => 'Dan Jasnowski',
    	'description' => 'Installs custom CMT Fields for iBoomerang agencies.',
    	'icon' => '',
    	'is_uninstallable' => true,
    	'name' => 'Custom CMT Fields',
    	'published_date' => 'May 24, 2010',
    	'type' => 'module',
    	'version' => '1.0',
    	'remove_tables' => 'prompt',
    );
    $installdefs = array(
    	'id' => 'ndops_dtk',
    		 'layoutfields' => array(
            0 => array(
            'additional_fields' => array(  
            'Contacts' => array(
                'name' => 'last_contacted_c',
                'label' => 'LBL_LAST_CONTACTED',
                
                ),
            ),
            ),
       ),  
    );
    ?>
    then I go to module loader. I upload it. Then I install it. It installs correctly. I go to Admin -> Studio then I go to Contacts -> Fields... and I DON'T see last_contacted_c

    Edit... I was looking through the Sugar CRM wiki and under custom_fields for Manifest... I saw modules... meaning "module: Used to specify the module where the custom field will be added. " What exactly does that mean?

    Thanks.
    Last edited by jsfdan; 2010-05-25 at 04:38 PM. Reason: Parentheses thought

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Import / Export Help
    By amathis in forum Help
    Replies: 1
    Last Post: 2010-02-02, 12:55 AM
  2. Import & Export Help
    By prav.bjets in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2009-09-23, 09:45 AM
  3. Replies: 3
    Last Post: 2007-01-05, 07:42 PM
  4. Export/Import
    By dretz in forum General Discussion
    Replies: 0
    Last Post: 2006-01-23, 05:44 AM
  5. import/export
    By colins in forum Help
    Replies: 1
    Last Post: 2004-07-21, 01:11 AM

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
  •