如何在VtigerCrm中创建SalesOrders使用restfulApi

时间:2017-08-17 13:54:12

标签: php crm vtiger vtigercrm

我尝试在vtigercrm中使用webservice来使用Postman创建SalesOrders 发送请求到webservice即时使用vtigercrm v 7.0当我尝试创建产品时它已经完成但是当我尝试创建SalesOrders失败任何人都知道元素必须在请求中发送什么或者如何在邮递员中发送请求 我用这个: url:... / webservice.php

body {

操作:创建

SESSIONNAME:

的ElementType:SalesOrder

元素:

{
  "salesorder_no": "SO1",
  "subject": "ffff",
  "potential_id": "",
  "customerno": "",
  "quote_id": "",
  "vtiger_purchaseorder": "",
  "contact_id": "",
  "duedate": "",
  "carrier": "",
  "pending": "",
  "sostatus": "Created",
  "txtAdjustment": "0.00000000",
  "salescommission": "0.000",
  "exciseduty": "0.000",
  "hdnGrandTotal": "0.00000000",
  "hdnSubTotal": "0.00000000",
  "hdnTaxType": "group",
  "discount_percent": "",
  "discount_amount": "",
  "hdnS_H_Amount": "0.00000000",
  "account_id": "11x192",
  "assigned_user_id": "19x1",
  "createdtime": "2017-08-17 11:55:51",
  "modifiedtime": "2017-08-17 11:55:51",
  "modifiedby": "19x1",
  "currency_id": "21x1",
  "conversion_rate": "1.000",
  "bill_street": "ddd",
  "ship_street": "dd",
  "bill_city": "",
  "ship_city": "",
  "bill_state": "",
  "ship_state": "",
  "bill_code": "",
  "ship_code": "",
  "bill_country": "",
  "ship_country": "",
  "bill_pobox": "",
  "ship_pobox": "",
  "description": "",
  "terms_conditions": "",
  "enable_recurring": "0",
  "recurring_frequency": "",
  "start_period": "",
  "end_period": "",
  "payment_duration": "",
  "invoicestatus": "c",
  "productid": "14x191",
  "quantity": "1.000",
  "listprice": "0.00000000",
  "comment": "",
  "tax1": "4.500",
  "tax2": "10.000",
  "tax3": "12.500",
  "pre_tax_total": "0.00000000",
  "hdnS_H_Percent": "0",
  "image": "",
  "purchase_cost": "0.00000000",
  "margin": "0.00000000",
  "source": "CRM",
  "starred": "0",
  "tags": "",
  "region_id": "0"
}

但总是返回

{
"success": false,
"error": {
    "code": "MANDATORY_FIELDS_MISSING",
    "message": "Mandatory Fields Missing.."
}

1 个答案:

答案 0 :(得分:1)

您确定所有SalesOrder必填字段都在您的元素数组中吗?

你可以在这里找到例子:

http://blog.crm-now.de/2015/07/25/samples-for-using-the-crm-interfaces/?lang=en