由于MANDATORY_FIELDS_MISSING“消息”,创建vTiger销售订单失败:“强制字段缺失

时间:2015-04-25 13:46:08

标签: web-services api vtiger

我正在尝试通过WebServices创建SalesOrder,但由于缺少必填字段,它总是失败。

我发送以下字段。

错误消息未指定缺少的字段

我正在使用vTiger 6.0.0

我怎样才能弄清楚

              salesOrder.subject = fullDescription
                salesOrder.sostatus = "delivered"
                salesOrder.account_id ='11x28'
                salesOrder.bill_street = shipping.address.street
                salesOrder.bill_city = shipping.address.city
                salesOrder.bill_state = shipping.address.state
                salesOrder.bill_code = shipping.address.postalCode
                salesOrder.bill_country = shipping.address.postalCode

                salesOrder.ship_street = shipping.address.street
                salesOrder.ship_city = shipping.address.city
                salesOrder.ship_state = shipping.address.state
                salesOrder.ship_code = shipping.address.postalCode
                salesOrder.ship_country = shipping.address.postalCode

                salesOrder.invoicestatus = "Created"
                salesOrder.productid = selectedServices[0].id
                salesOrder.quantity = 1
                salesOrder.listprice = selectedServices[0].unit_price

                //
                salesOrder.comment= ""
                salesOrder.tax1 = ""
                salesOrder.tax2 = "10.000"
                salesOrder.tax3 = "6.000"
                salesOrder.pre_tax_total = "876.00"
                salesOrder.currency_id = "21x1"
                salesOrder.conversion_rate = "1.000"
                salesOrder.tax4 = ""

                salesOrder.duedate = "2014-12-12"
                salesOrder.carrier = "FedEx"
                salesOrder.pending = ""
                salesOrder.txtAdjustment = "-21.00000000"
                salesOrder.salescommission = "5.000"
                salesOrder.exciseduty = "0.000"
                salesOrder.hdnGrandTotal = "995.16000000"
                salesOrder.hdnSubTotal = "876.00000000"
                salesOrder.hdnTaxType = "group"
                salesOrder.hdndiscountamount = "0"
                salesOrder.hdnS_H_Percent = "21"
                salesOrder.discount_percent = "25.000"
                salesOrder.discount_amount = ""
                salesOrder.terms_conditions = "- Unless "
                salesOrder.enable_recurring = "0"

2 个答案:

答案 0 :(得分:3)

我错过了LineItems。请注意它必须是CamelCase

"LineItems": [
    {
        "productid": "25x142",
        "listprice": "299.00000000",
        "quantity": "1"
    }
],

答案 1 :(得分:0)

您错过了必填字段“已分配给”