[英]CRM dynamics 2011 XML missing request
我的XML請求遇到了問題,這是CRM動態2011網絡的一部分,以便創建銷售線索。
我目前停留的代碼如下:
<s:Body>
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<b:KeyValuePairOfstringanyType>
<c:key>name</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Name Test 1</c:value>
<c:key>E-mail</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">test@test.com</c:value>
</b:KeyValuePairOfstringanyType>
</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>account</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>
</s:Body>
在我找到的代碼中已經可以使用該名稱,我嘗試添加Email屬性(甚至是地址),但是CRM中除了名稱之外什么都沒有,代碼中的錯誤到底是什么? 應該如何解決?
感謝您的幫助,並在此先感謝大家。
我相信您需要使用屬性的邏輯名而不是顯示名(用emailaddress1代替E-mail)。 另外,我相信您要為每個要發送的屬性都擁有一個KeyValuePair節點,因為它是要發送的屬性數組。 嘗試以下方法:
<b:KeyValuePairOfstringanyType>
<c:key>name</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Name Test 1</c:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<c:key>emailaddress1</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">test@test.com</c:value>
</b:KeyValuePairOfstringanyType>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.