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

Lennart van Ballegoij lennart at egmmedia.nl
Tue Apr 12 08:56:58 GMT 2016


Hey Guys,


Anyone an idea what's causing the SalesOrder to loose the attached items on
an edit of a field from withing my custom module ?

I'm still not sure what's causing this problem, i'm thinking of testing the
same code on a clean VTiger system tonight to be sure that nothing is
interfering with my code.

I've already tested turning of all custom EventHandlers and Workflows but
this was not what was causing the SalesOrder to loose attached items.

Hopefully i will find out more about my issues tonight, any guesses would
be appreciated.


Thanks in advance,

Lennart

Met vriendelijke groet,
Lennart VAN Ballegoij
Backend Developer
+31 (0) 85 30 300 50 Westerlaan 51
lennart at egmmedia.nl 8011 CA Zwolle
This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
E-mails are not secure and cannot be guaranteed to be error free as they
can be intercepted, amended, or contain viruses. Anyone who communicates
with us by e-mail is deemed to have accepted these risks. EGM Media is not
responsible for errors or omissions in this message and denies any
responsibility for any damage arising from the use of e-mail. Any opinion
and other statement contained in this message and any attachment are solely
those of the author and do not necessarily represent those of the company.

2016-04-08 15:01 GMT+02:00 Lennart van Ballegoij <lennart at egmmedia.nl>:

> 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/20160412/45f32160/attachment.html>


More information about the vtigercrm-developers mailing list