简体   繁体   English

PHP 无法在 Dynamics CRM 2013 上为查找字段设置空值

[英]PHP Unable to set empty value to lookup field on Dynamics CRM 2013

I am using PHP SDK https://github.com/Rocketeer007/php-dynamics-crm-2011 to connect Dynamics CRM and try to set empty value in lookup field but didn't get success.我正在使用 PHP SDK https://github.com/Rocketeer007/php-dynamics-crm-2011连接 Dynamics CRM 并尝试在查找字段中设置空值但没有成功。 Following are SOAP request and response data以下是 SOAP 请求和响应数据

Request要求

<?xml version="1.0" encoding="UTF-8"?>
<Update xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <entity>
      <b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
         <b:KeyValuePairOfstringanyType>
            <c:key>key name</c:key>
            <c:value xmlns:d="http://www.w3.org/2001/XMLSchema" i:type="d:string">Test</c:value>
         </b:KeyValuePairOfstringanyType>
         <b:KeyValuePairOfstringanyType>
            <c:key>Entity Name</c:key>
            <c:value i:type="b:EntityReference">
               <b:Id i:nil="true" />
               <b:LogicalName>Lookup Entity Name</b:LogicalName>
               <b:Name i:nil="true" />
            </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>guild</b:Id>
      <b:LogicalName>entity name</b:LogicalName>
      <b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
   </entity>
</Update>

Response回复

Uncaught SoapFault exception: [Sender] The formatter threw an exception while trying to deserialize the message未捕获的 SoapFault 异常:[Sender] 格式化程序在尝试反序列化消息时抛出异常

what am I doing wrong here?我在这里做错了什么?

2011 seems to be really old. 2011年好像真的很老了。 Check following toolkit instead - https://github.com/AlexaCRM/php-crm-toolkit I'm pretty sure it's up-to-date.请改为检查以下工具包 - https://github.com/AlexaCRM/php-crm-toolkit我很确定它是最新的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM