[Vtigercrm-developers] Editing Inventory related module via webservice

Alexander Allen alexander.allenz at gmail.com
Mon Sep 23 03:26:08 GMT 2024


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();

?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20240922/4506b849/attachment.html>


More information about the vtigercrm-developers mailing list