CRUD 작업에 SOAP을 사용한다고 생각합니다. 여기에 비누 레코드의 병합입니다 : 물론
POST https://pactest.api.crm.dynamics.com/XRMServices/2011/Organization.svc/web
Content-Type: text/xml; charset=utf-8
SOAPAction: http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<request i:type="b:MergeRequest" xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:b="http://schemas.microsoft.com/crm/2011/Contracts">
<a:Parameters xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<a:KeyValuePairOfstringanyType>
<c:key>Target</c:key>
<c:value i:type="a:EntityReference">
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>account</a:LogicalName>
<a:Name i:nil="true" />
</c:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<c:key>SubordinateId</c:key>
<c:value i:type="d:guid" xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</c:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<c:key>UpdateContent</c:key>
<c:value i:type="a:Entity">
<a:Attributes />
<a:EntityState i:nil="true" />
<a:FormattedValues />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>account</a:LogicalName>
<a:RelatedEntities />
</c:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<c:key>PerformParentingChecks</c:key>
<c:value i:type="d:boolean" xmlns:d="http://www.w3.org/2001/XMLSchema">true</c:value>
</a:KeyValuePairOfstringanyType>
</a:Parameters>
<a:RequestId i:nil="true" />
<a:RequestName>Merge</a:RequestName>
</request>
</Execute>
</s:Body>
</s:Envelope>
당신은 병합 할 레코드의 올바른 ID를 가진 Guid.Empty를 교체해야합니다.
프로세스를 좀 더 객체 지향적으로 만들기 위해 모든 엔티티를 클래스로 만들었습니다. 내 물건과 업데이트로 같은 요청을 모의하려고 노력할 것이다. 응답 해 주셔서 감사합니다. – Arjun
이 경우 두 계정을 병합 할 때 어떤 매개 변수가 변경되어 우승 한 필드를 수정합니까? 예를 들어, 잃어버린 계정의 한 필드를 유지할 수 있습니까? – Arjun