[Vtigercrm-developers] Is it possible to add and receive sales order products through webservices?

Adam Heinz amh at metricwise.net
Thu Aug 9 06:58:43 PDT 2012


On Thu, Aug 9, 2012 at 1:16 AM, ram prasad <ramtrg at gmail.com> wrote:
> I am creating Sales Order using Web service using vtwsclib-1.4(Java script).
> I am able to Create Sales from my client Application and it stored in
> vtiger_salesorder   table. But i am not able to pass line items(products)
> through web service. I have seen products(lineitems) stored in
> vtiger_inventoryproductrel Table.
> Is it possible to add and receive sales order products through webservices?

This is a known problem with Quotes, SalesOrders and Invoices.

https://forums.vtiger.com/viewtopic.php?t=34200

The function that normally does that work is saveInventoryProductDetails.

http://trac.vtiger.com/cgi-bin/trac.cgi/browser/vtigercrm/branches/5.4.0/include/utils/InventoryUtils.php#L512

It would be a bit of a hack, but you might be able to trick the web
service into doing what you want if you sent the items as part of the
request (not the json-encoded entity).  If you go down that road, be
careful that you don't erase your items the first time you make a
change to the SalesOrder without changing the items.


More information about the vtigercrm-developers mailing list