<div dir="auto">Thank you Alan. With php error reporting doesn’t show anything. Indeed I log the content of the Invoice after that line and shows good but when I go to the record it disappears.</div><div dir="auto"><br></div><div dir="auto">Already tried with another modules and it’s the same.</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2024 at 04:14 Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You'll need to debug it using the log and possibly php error reporting.<br>
<br>
Initial thoughts are maybe a new mandatory field or something like that <br>
preventing it from saving?<br>
<br>
Al<br>
<br>
On 29/06/2024 16:52, Alexander Allen wrote:<br>
> After a migration from vtiger 8.0 to 8.2 I cant run the following <br>
> script.  If I dont set the mode to edit it creates a new Invoice but if <br>
> I set to edit, it doesnt change.<br>
> <br>
> Does someone had the same issue?<br>
> <br>
> $linkModule ="Invoice";<br>
> $recordModel= Vtiger_Record_Model::getInstanceById($idenvio,$linkModule);<br>
> $recordModel->set('invoicestatus', 'Cancel');<br>
> $recordModel->set('mode','edit');<br>
> $recordModel->save();<br>
> <br>
> _______________________________________________<br>
> <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div></div>