You need to sign in to do that
Don't have an account?
![David Baumann 31 David Baumann 31](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How to Delete AccountContactRelation Record with SOAP API Call?
We are planning to deepen out integration between Salesforce and a third-party tool. Within the tool we have multiple accounts related to one contact. To replicate the relations between these contacts and accounts, I activated the AccountContactRelation Object in Salesforce. Now I can successfully create a relation based on a SOAP create() call which uses the external IDs to relate the records, but I can not delete such a relation in response to a change in the external system. (I use SoapUI for testing)
I tried to use this SOAP delete() request:
I tried to use this SOAP delete() request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com"> <soapenv:Header> <urn:SessionHeader> <urn:sessionId>${#TestCase#sessionId}</urn:sessionId> </urn:SessionHeader> </soapenv:Header> <soapenv:Body> <urn:delete> <!--Zero or more repetitions:--> <urn:sObjects xsi:type="urn1:AccountContactRelation" xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"> <!--Zero or more repetitions:--> <Account> <Account_ExternalID__c>2648</Account_ExternalID__c> </Account> <Contact> <Contact_ExternalID__c>4585</Contact_ExternalID__c> </Contact> </urn:sObjects> </urn:delete> </soapenv:Body> </soapenv:Envelope>I get the following error message:
Unexpected element {}Account during simple type deserializationWhat am I doing wrong?