Not able to import records in new custom module

Hello all

We are using SuiteCRM 7.9.8 and have created a new module with the ā€œModule Builderā€ tool.
The thing is that even we have set to true the flag ā€œImport Recordsā€ to allow this new custom module to import new records from excel or csv filesā€¦ once the new custom module is deployed, and we see the ā€œImport Recordsā€ button in the List View, when we try to start the process we get this error

I have seen that this was an issue included in the forum in the post:

ā€œhttps://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19060-imports-aren-t-set-up-for-this-module-typeā€

But the solution was to find a file named "<module_key>_<module_name>.pdf"where there should be an option ā€˜$importable = false;ā€™ but we are not able to find it.

Anyone can help please?

The extension is not PDF, itā€™s PHP.

It says the file should be in

./modules/<module_key><module_name>/<module_key><module_name>_sugar.php

But i guess for custom modules it should be under the ā€œcustomā€ directory. Search also for similar files, anything ending in ā€œsugar.phpā€

Hello, thanks a lot!

I have searched and in the ā€œCustomā€ folder in the project, and in the new custom module folder, but there is not such file. There is only the ā€œExtā€ folder and no file inside is like the one we are looking for.

I have found other modulename_sugar.php files, but not for my custom module

Is it enought to copy the file from other module,and change the ā€œModule Nameā€ within the file?

Copying from another module is worth a try, yes. But look inside the file and change the Class names and module references. Youā€™ll need some (not necessarily complete) understanding of what itā€™s doing in order to change it successfully.

No, I have copied the Calls_Rescheduler_sugar.php module and called it to my new custom module

Conec_Distribuidor_sugar.php with this content

class Conec_Distribuidor_sugar extends Basic {
        var $new_schema = true;
        var $module_dir = 'Conec_Distribuidor';
        var $object_name = 'Conec_Distribuidor';
        var $table_name = 'conec_distribuidor';
        var $importable = true;
        var $tracker_visibility = false;
        var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if th$


    function Conec_Distribuidor_sugar(){
        $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
        if(isset($GLOBALS['log'])) {
            $GLOBALS['log']->deprecated($deprecatedMessage);
        }
        else {
            trigger_error($deprecatedMessage, E_USER_DEPRECATED);
        }
        self::__construct();
    }


        function bean_implements($interface){
                switch($interface){
                        case 'ACL': return true;
                }
                return false;
}

}
?>

Then in Admin I run ā€œQuick Repairā€ā€¦ but still getting the same result.

Is this a normal bug when you create a new module??

I think I am gonna start trying with ETL, but should be easier with the import tool of the SuiteCRM rigt?

I donā€™t know much about how all this works.

You can consider importing from SQL, that is always a quick option. If this is meant to be just a one-time large import, I would definitely do it with phpMyAdmin.

If you need a UI process to be done by users, then it gets more complicated.