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

Lennart van Ballegoij lennart at egmmedia.nl
Fri Apr 8 13:01:04 GMT 2016


Dear Alan,


Thanks for your respons, i tried this method right away but for some reason
i get the same result :|
My field gets edited just like it should, but the attached
items/products disappear
again.

To be sure this was not caused by any of my Workflows or Eventhandlers i
turned them all off but still the problem persists.

Do you have any other ideas on how to fix this or how to workaround this ?

Thanks in advance,


Lennart


2016-04-08 12:52 GMT+02:00 Alan Lord <alanslists at gmail.com>:

> 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
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160408/13f61edf/attachment.html>


More information about the vtigercrm-developers mailing list