【问题标题】:CRM dynamics 2011 XML missing requestCRM 动态 2011 XML 缺少请求
【发布时间】:2013-03-24 03:11:48
【问题描述】:

我的 XML 请求存在问题,该请求是 2011 年 CRM 动态网络的一部分,用于创建潜在客户。

我现在卡在的代码如下:

            <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>

该名称已在我找到的代码中可用,我尝试添加电子邮件属性(甚至是地址),但在 CRM 中除了名称之外什么都没有,代码中的错误到底是什么?应该如何解决?

感谢任何帮助,并提前感谢大家。

【问题讨论】:

    标签: php dynamics-crm-2011


    【解决方案1】:

    我相信您需要使用属性的逻辑名称而不是显示名称(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>
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-16
    • 1970-01-01
    • 2011-06-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多