SugarCRM 7 — Enable Importing on Custom Modules

Shane Dowling
Sep 11, 2014 · 1 min read
Image for post
Image for post

I’ve been wracking my brain trying to get this guide to work with SugarCRM 7. Add to the fact that it “looks” like this is also how it’s done in SugarCRM 7, if you peruse the code under Accounts or Contacts. However it isn’t. This is how I’ve added importing support to custom modules.

Set Module as Importable

Under modules/<ModuleName>/<ModuleName>_sugar.php set

public $importable = true;

Add Menu Item

Under modules/<MODULES>/clients/base/menus/header/header.php you
should have something like

$moduleName = ‘’;
$viewdefs[$moduleName][‘base’][‘menu’][‘header’] = array(
‘route’ => “#$moduleName/create”,
‘label’ => ‘LNK_NEW_RECORD’,
‘acl_action’ => ‘create’,
‘acl_module’ => $moduleName,
‘icon’ => ‘icon-plus’,
‘route’ => “#$moduleName”,
‘label’ => ‘LNK_LIST’,
‘acl_action’ => ‘list’,
‘acl_module’ => $moduleName,
‘icon’ => ‘icon-reorder’,

If not create the file with that array. Next add the import action to
the array.

‘route’ => ‘#bwc/index.php?’ . http_build_query(
‘module’ => ‘Import’,
‘action’ => ‘Step1’,
‘import_module’ => $moduleName,
‘label’ =>’LBL_IMPORT’,
‘icon’ => ‘icon-upload’,

Add language setting

Under /modules/<MODULES>/language/en_us.lang.php add into the
$mod\_strings array(if it’s not already there):

‘LBL_IMPORT’ => ‘Import ‘,


The inevitable quick repair/rebuild.

Tech Blog

Random smattering of technical posts

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store