[Vtigercrm-developers] mass import of calendar events in vtiger 7.1

lucia digirolamo l.digirolamo at websonica.net
Wed Sep 19 08:12:58 GMT 2018


Hi,

I'm migrating data from an old crm to my new crm. The new crm is a 
vtiger 7.1. I've successfully imported almost all my data using vtiger 
import tool. The only data I cannot import are the events in the 
calendar. I tried both with csv format and ics format. The csv format 
gets stalled at the third step: no error shows, it simply wont start. 
The icsv format seems to be working but it has imported only 16 record 
over 90. I don't know which records has been importing and based on what 
conditions, but it wont import all the events. I thought about creating 
the events with a custom php script so I created a file in my vtiger 
root but I cannot use rest api but they dont work on my environment 
because apparently I miss http client library, so I tried to use the 
server api that I usually use with workflows but for some reason those 
dont work outside workflows. I also tried to include directly the module 
file for the calendar in my script, but again this fails:

ini_set('display_errors',1);
#error_reporting(E_ALL^E_NOTICE);

include_once('include/Webservices/Utils.php');
include_once('config.php');
require_once('include/database/PearDatabase.php');
require_once('includes/runtime/Globals.php');
require_once('includes/runtime/LanguageHandler.php');
require_once('includes/Loader.php');
require_once('includes/runtime/BaseModel.php');
require_once('include/logging.php');
require_once('include/utils/utils.php');
require_once('data/CRMEntity.php');
require_once('include/utils/UserInfoUtil.php');
require_once('modules/Users/Users.php');
require_once('modules/Calendar/Calendar.php');
require_once('modules/Potentials/Potentials.php');

global $adb;
global $log, $current_user;

if (!$current_user) {
     $current_user = new Users();
     $current_user_id = 1;
     $current_user = 
$current_user->retrieve_entity_info($current_user_id, "Users");
}

$pot = new Potentials();
$pot->retrieve_entity_info('13x19311', 'Potentials');


$cal = new Calendar();
$cal->retrieve_entity_info('9x19339', 'Potentials');



In the script above, the first call for potentials gives *Fatal error*: 
Uncaught Exception in /data/CRMEntity.php:877 Stack trace: #0 
/testrest.php(42): CRMEntity->retrieve_entity_info('13x19311', 
'Potentials') #1 {main} thrown in */data/CRMEntity.php* on line *877*

While the second call for calendar returns Call to undefined method 
Calendar::retrieve_entity_info().


So now I wonder:

- is there a way to import the calendar events?

- how can I have the script in my vtiger root working?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180919/b7e5710d/attachment.html>


More information about the vtigercrm-developers mailing list