[Vtigercrm-developers] change to lead delivery?

Mariusz Krzaczkowski m.krzaczkowski at opensaas.pl
Thu Oct 16 08:28:02 GMT 2014


Hi

Here is an example how to edit records in vtiger

*include_once 'includes/main/WebUI.php';*
*$recordId = 101;*
*$moduleName = 'Leads';*
*$assigned_user_id = 1;*
*$user = new Users();*
*$current_user = $user->retrieveCurrentUserInfoFromFile( $assigned_user_id
);*

*$recordModel = Vtiger_Record_Model::getInstanceById($recordId,
$moduleName);*
*$recordModel->set('id', $recordId);*
*$recordModel->set('lastname', 'dddd');*
*$recordModel->set('mode', 'edit');*
*$recordModel->save();*

*Z poważaniem / Best regards*
*Mariusz Krzaczkowski*

*m.krzaczkowski at opensaas.pl <m.krzaczkowski at opensaas.pl>www.OpenSaaS.pl
<http://www.opensaas.pl/>*


---------- Forwarded message ----------
> From: Prasad <prasad at vtiger.com>
> Date: 2014-10-16 5:22 GMT+02:00
> Subject: Re: [Vtigercrm-developers] change to lead delivery?
> To: "vtigercrm-developers at lists.vtigercrm.com" <
> vtigercrm-developers at lists.vtigercrm.com>
>
>
> Alex,
>
> I would suggest the use of Sever APIs
> <http://community.vtiger.com/help/vtigercrm/developers/server-apis.html>
> (if its from other app - refer here
> <http://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html>)
> for CRUD operation.
>
> *Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
> <http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
> <https://blogs.vtiger.com/>* I* Wiki
> <http://wiki.vtiger.com/vtiger6/index.php/Main_Page> *I* Website
> <https://www.vtiger.com/>
>
> On Thu, Oct 16, 2014 at 3:04 AM, Alex Martin <alex at theclearsource.com>
> wrote:
>
>> 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
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141016/b50bc613/attachment.html>


More information about the vtigercrm-developers mailing list