MS CRM2011 SOAP request


MS CRM2011 SOAP request

由于某种原因,所有其他数据都是由以下三行导入的。是否将数据添加到ms crm dynamics 2011?

我有三个字段my_paid:两个选项(是=1;否=0)my_price:货币my_date_paid:日期和时间

    <b:keyvaluepairofstringanytype>
        <c:key>my_paid</c:key>
        <c:value i:type="c:boolean">1</c:value>
    </b:keyvaluepairofstringanytype> 
    <b:keyvaluepairofstringanytype>
        <c:key>my_price</c:key>
        <c:value>' . $data->newprice . '</c:value>
    </b:keyvaluepairofstringanytype> 
    <b:keyvaluepairofstringanytype>
        <c:key>my_date_paid</c:key>
        <c:value i:type="d:dateTime" xmlns:d="http://www.w3.org/2001/XMLSchema">' . gmdate("Y-m-d'TH:i:s'Z", time()+10800) . '</c:value> 
    </b:keyvaluepairofstringanytype>

我强烈建议您从Dynamics CRM SDK中获取SoapLogger,因为这将帮助您解决此类问题。

http://www.microsoft.com/en-us/download/details.aspx?id=24004

第一项应为true/false,而不是1。

my_price可能是一个Money列,它的处理方式略有不同,而您的dateTime看起来是正确的,所以它可能只是由于前两项。

下面是"报价"实体的一个示例,应该会有所帮助。

         <a:KeyValuePairOfstringanyType>
            <b:key>freightamount</b:key>
            <b:value i:type="a:Money">
               <a:Value>1</a:Value>
            </b:value>
         </a:KeyValuePairOfstringanyType>
         <a:KeyValuePairOfstringanyType>
            <b:key>effectivefrom</b:key>
            <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:dateTime">2013-09-03T02:55:30Z</b:value>
         </a:KeyValuePairOfstringanyType>
         <a:KeyValuePairOfstringanyType>
            <b:key>willcall</b:key>
            <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
         </a:KeyValuePairOfstringanyType>