[Vtigercrm-developers] change to lead delivery?

Sebastiaan Venema - Jansen Pro Office svenema at jansenprooffice.nl
Thu Oct 16 06:47:51 GMT 2014


Hello Alex,

I had somewhat the same problem with $invoice->save("Invoices");
When calling save from your own script vtlib is used: \vtlib\Vtiger\Deprecated.php
This leads to some missing dependancies.

I resolved this by adding requirements to some files:
\vtlib\Vtiger\Deprecated.php
require_once 'includes/runtime/LanguageHandler.php';

\includes\runtime\LanguageHandler.php
require_once 'includes/Loader.php';

\modules\Vtiger\models\Record.php
require_once 'includes/runtime/BaseModel.php';
require_once 'includes/runtime/Globals.php';

This solved my problem for saving invoices from my own php script.

Sebastiaan




Van: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] Namens Alex Martin
Verzonden: woensdag 15 oktober 2014 23:35
Aan: vtigercrm-developers at lists.vtigercrm.com
Onderwerp: [Vtigercrm-developers] change to lead delivery?

I used to use a basic php script to import leads from an xml source while processing some additional checks on our end prior to importing the lead to the crm, now it just seems to import the lead but the workflows are not triggered and any items after the "$lead->save("Leads");" are not completed. Any idea what has changed?

require_once('config.php');
require_once('modules/Leads/Leads.php');
require_once('include/database/PearDatabase.php');
require_once('include/utils/utils.php');
require_once('include/language/en_us.lang.php');
require_once('include/ComboStrings.php');

$lead = new Leads();
$lead->column_fields["firstname"] = $firstname;
$lead->column_fields["lastname"] = $lastname;
$lead->column_fields["assigned_user_id"] = '1';
$lead->column_fields["phone"] = $phone;
$lead->column_fields["lane"] = $street;
$lead->column_fields["city"] = $city;
$lead->save("Leads");


I also have to use an older version of the Leads.php file to make it work.

Any help would be greatly apprecieted.

Thanks

Alex


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


More information about the vtigercrm-developers mailing list