Php 如何使用restfulApi在VtigerCrm中创建销售订单
im尝试使用vtigercrm中的webservice使用Postman创建销售订单 若要将请求发送到webservice im,请在尝试创建产品时使用vtigercrm v 7.0,该操作已完成,但在尝试创建销售订单失败时,任何人都知道元素必须在请求中发送什么,或者请求如何在邮递员中发送 我用这个: url:…/webservice.php 身体{ 操作:创建 会话名称: 元素类型:销售订单 要素:Php 如何使用restfulApi在VtigerCrm中创建销售订单,php,crm,vtiger,vtigercrm,Php,Crm,Vtiger,Vtigercrm,im尝试使用vtigercrm中的webservice使用Postman创建销售订单 若要将请求发送到webservice im,请在尝试创建产品时使用vtigercrm v 7.0,该操作已完成,但在尝试创建销售订单失败时,任何人都知道元素必须在请求中发送什么,或者请求如何在邮递员中发送 我用这个: url:…/webservice.php 身体{ 操作:创建 会话名称: 元素类型:销售订单 要素: { "salesorder_no": "SO1", "subject": "ffff"
{
"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.."
}
您确定所有SalesOrder必填字段都在元素数组中吗 您可以在此处找到示例:
对不起,我不明白…你说你成功创建了产品,所以这与创建销售订单的方法相同。你能给我澄清一下吗?我希望ceate销售订单在vtigercrm中使用api webservice。当我尝试创建产品时,它是成功的,但当尝试创建销售订单时,我失败,webservice返回是明确的。缺少一个必填字段在你的元素数组中,我想知道我遗漏了哪些必填字段添加到数组中两种方法来知道遗漏了哪些必填字段。第一种方法是,如果你有权访问vtiger日志,你可以在webservice调用后立即签入日志文件。第二种方法是,你可以通过TheWebService使用descriple操作,并且响应会给你一个描述SalesOrder模块包含一个数组,其中包含每个字段的描述。