Menu

SuiteCRM Master Classes 2018

Welcome, Guest
Username: Password: Remember me

TOPIC: Not able to import records in new custom module

Not able to import records in new custom module 3 days 17 hours ago #66125

  • jlabuelo
  • jlabuelo's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Thank you received: 1
  • Karma: 0
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:

"suitecrm.com/suitecrm/forum/suitecrm-7-0...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?
Last Edit: 3 days 17 hours ago by jlabuelo.
The administrator has disabled public write access.

Not able to import records in new custom module 3 days 16 hours ago #66135

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 5865
  • Thank you received: 908
  • Karma: 216
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"
The administrator has disabled public write access.

Not able to import records in new custom module 3 days 16 hours ago #66136

  • jlabuelo
  • jlabuelo's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Thank you received: 1
  • Karma: 0
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?
The administrator has disabled public write access.

Not able to import records in new custom module 3 days 13 hours ago #66150

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 5865
  • Thank you received: 908
  • Karma: 216
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.
The administrator has disabled public write access.

Not able to import records in new custom module 3 days 13 hours ago #66153

  • jlabuelo
  • jlabuelo's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Thank you received: 1
  • Karma: 0
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?
The administrator has disabled public write access.

Not able to import records in new custom module 3 days 13 hours ago #66155

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 5865
  • Thank you received: 908
  • Karma: 216
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.
The administrator has disabled public write access.
Time to create page: 0.064 seconds
Powered by Kunena Forum