[Vtigercrm-developers] Editing Inventory related module via webservice

Matúš Sopko sopko at its4you.sk
Mon Sep 23 07:45:55 GMT 2024


try to add

//Inventory line items getting wiped out $_REQUEST['ajxaction'] ='DETAILVIEW';

before
$recordModel->save();

S pozdravom / Best regards / Mit freundlichen Grüßen
Ing. Matus SOPKO
IT-Solutions4You s.r.o.
Tel. +421/ 51/ 7732370
email:sopko at its4you.sk
http://www.its4you.sk



On 23. 9. 2024 5:26, Alexander Allen wrote:
> Hello, I want to update a quotestage from a quote but when I do it via 
> webservice all the products in the quote disappear. I tried also to 
> get all the products via webservice but I only get the last product.   
> Can you give me an idea how can I achieve this?
>
> My code looks like this:
>
> <?php
> include_once 'include/Webservices/Utils.php';
> require_once('includes/main/WebUI.php');
> include_once 'include/Webservices/ModuleTypes.php';
> include_once 'include/Webservices/Query.php';
>
> $current_user = CRMEntity::getInstance('Users');
> $current_user->retrieveCurrentUserInfoFromFile(1);
> include_once 'include/Webservices/Create.php';
> $linkModule ="Quotes";
> $recordModel= Vtiger_Record_Model::getInstanceById($newId,$linkModule);
> $recordModel->set('mode','edit');
> $recordModel->set('quotestage', 'SENT');
> $recordModel->save();
>
> ?>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20240923/551e472e/attachment.html>


More information about the vtigercrm-developers mailing list