<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>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:</p>
<p>ini_set('display_errors',1);<br>
#error_reporting(E_ALL^E_NOTICE);<br>
<br>
include_once('include/Webservices/Utils.php');<br>
include_once('config.php');<br>
require_once('include/database/PearDatabase.php');<br>
require_once('includes/runtime/Globals.php');<br>
require_once('includes/runtime/LanguageHandler.php');<br>
require_once('includes/Loader.php');<br>
require_once('includes/runtime/BaseModel.php');<br>
require_once('include/logging.php');<br>
require_once('include/utils/utils.php');<br>
require_once('data/CRMEntity.php');<br>
require_once('include/utils/UserInfoUtil.php');<br>
require_once('modules/Users/Users.php');<br>
require_once('modules/Calendar/Calendar.php');<br>
require_once('modules/Potentials/Potentials.php');</p>
<p>global $adb;<br>
global $log, $current_user;</p>
<p>if (!$current_user) {<br>
$current_user = new Users();<br>
$current_user_id = 1;<br>
$current_user =
$current_user->retrieve_entity_info($current_user_id, "Users");<br>
}</p>
<p>$pot = new Potentials();<br>
$pot->retrieve_entity_info('13x19311', 'Potentials');</p>
<p><br>
</p>
<p>$cal = new Calendar();<br>
$cal->retrieve_entity_info('9x19339', 'Potentials');<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>In the script above, the first call for potentials gives <b>Fatal
error</b>: Uncaught Exception in /data/CRMEntity.php:877
Stack trace:
#0 /testrest.php(42):
CRMEntity->retrieve_entity_info('13x19311', 'Potentials')
#1 {main} thrown in <b>/data/CRMEntity.php</b> on line <b>877</b></p>
<p>While the second call for calendar returns Call to undefined
method Calendar::retrieve_entity_info(). <br>
</p>
<p><br>
</p>
<p>So now I wonder:<br>
</p>
<p>- is there a way to import the calendar events?</p>
<p>- how can I have the script in my vtiger root working? <br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>