[Vtigercrm-developers] Save SalesOrder record from within custom module

Alan Lord alanslists at gmail.com
Fri Apr 8 10:52:08 GMT 2016


On 08/04/16 11:16, Lennart van Ballegoij wrote:
> Hey guys,
>
>
> I'm trying to edit a SalesOrder field from within my custom module.
> I've got no problem editing the field but after the save of the record
> the attached items/products disappear.
>
> Has someone encountered this issues before ?
>
> I'm using the following code to edit the Record:
>
> $recordModel = Vtiger_Record_Model::getInstanceById($salesorderid, 'SalesOrder');
> $recordModel->set('mode','edit');
> $recordModel->set('cf_762','1');
> $recordModel->save();

Have you tried using the vtws_revise server API?

http://community.vtiger.com/help/vtigercrm/developers/server-apis.html#revise


Al




More information about the vtigercrm-developers mailing list