Search code examples
phpcrmsugarcrm

How to import csv into custom modules? - in SugarCRM


Is it possible to import .csv fields into custom created modules in SugarCRM?

I have created several custom modules, but I can't find an import button for csv fields.

Thanks!

OK, I've just found a working solution: Link: http://www.sugarcrm.com/forums/f148/how-add-import-option-custom-modules-45612/

Add the below line in modules//.php file.

Code:

var $importable = true;

Create the file menu.ext.php in "custom\modules\\Ext\Menus" with below code.

Code:

<?php

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 

if(ACLController::checkAccess('<Module Name>', 'import', true))     $module_menu[]=Array("index.php?module=Import&action=Step1&import_module=<Module Name>&return_module=<Module Name>&return_action=index", "Import","Import", '<Module Name>');

?>

This will add import menu item in the shortcut menu.


Solution

  • Another possibility (way easier) is to check the button for "Importing" when building a new custom module via the module builder!