Custom module and bulk importing

Were using SuiteCRM (Version 7.11.3 Sugar Version 6.5.25 (Build 344)) My colleague created a couple of custom modules that are now in full use.Unfortunately when she built them she didn’t tick the box to enable bulk importing. Enabling this now is likely to lead to data loss so I have tried to follow the instructions here:
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_8.3/Cookbook/Enabling_Importing_for_Custom_Modules/index.html
All is well until I get to point 4 edit the ./modules/<module_key>_<module_name>/clients/base/menus/header/header.php This does not exist in our version of Suite. Am I missing something here? How can we get the bulk import to work with these custom modules?

Appreciate any help on this.

Oh!!!

You followed SugarCRM guide… This is not related to SuiteCRM.
Anyhow if you want to enable import for any module. This is simple.

let say module name=“NewModule”

Go to module directory. Open “NewModule.php” file and set the value for

 public $importable = true;

and also check “Menu.php” file there in the module folder. Check if “Import” link is not there. add a line like,

if(ACLController::checkAccess(‘NewModule’, ‘import’, true)){
$module_menu[]=array(‘index.php?module=Import&action=Step1&import_module=NewModule&return_module=NewModule&return_action=index’, $app_strings[‘LBL_IMPORT’], ‘Import’, ‘NewModule’);
}

And then repair the CRM

That’s it

3 Likes

Your a legend! That worked. I had done the first part i.e public $importable = true;. It was the second part I didn’t know about. Your answer sorted it for me. Thanks very much.

I have just one idiosyncrasy in that the import button does not say “import” but instead says “Array”: But this is not such a big deal as the button does what I want it to do.

send me your menu.php, i can set the link

Here you go…

Please set the last if condition as

if(ACLController::checkAccess('CLDLE_ColdLeads', 'import', true)){
$module_menu[]=array('index.php?module=Import&action=Step1&import_module=CLDLE_ColdLeads&return_module=CLDLE_ColdLeads&return_action=index', $mod_strings['LNK_IMPORT_CLDLE_ColdLeads'], 'Import', 'CLDLE_ColdLeads');
}

if there is no label for “LNK_IMPORT_CLDLE_ColdLeads”, create a new one in language file of the module for this.

thanks

1 Like

That worked too, had to add a reference to it in the language file but it got the label text working. Thanks again for all your help.

1 Like

You are most welcome

Thank you!!! Works like a charm.

1 Like