• Gavin Chin
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi All,
I have contacts(updates and new) from an external system which i need to send over to Salesforce(SF) via SOAP. I have created a field (IFCS_c) as an external id with the intention to use this as part of the upsert so that SF will either create a new contact or update an existing contact. At the same time if it is a new contact i need to associate it to an existing Account record object using AccountId field in Contact. The external id field name is set to IFCS_c. The upsert for contact WSDL is as below:
  <urn:externalIDFieldName>IFCS__c</urn:externalIDFieldName>
  <urn:sObjects xsi:type="Contact" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <urn:AccountId>001S000000nbmnsIAA</urn:AccountId>
    <urn:IFCS__c>1741</urn:IFCS__c>
    <urn:Contact_Type__c>Card Delivery</urn:Contact_Type__c>
    <urn:MailingStreet/>
    <urn:OtherStreet/>
    <urn:FirstName>Bob Tester</urn:FirstName>
    <urn:LastName>Bob Tester</urn:LastName>
    <urn:Primary__c>false</urn:Primary__c>
  </urn:sObjects>
</urn:upsert>

I am getting the following message:
<con1:ReceivedFaultDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
      <con1:faultcode xmlns:urn="urn:fault.enterprise.soap.sforce.com">urn:INVALID_FIELD</con1:faultcode>
      <con1:faultstring>INVALID_FIELD: Field name provided, IFCS__c does not match an External ID for Contact</con1:faultstring>
      <con1:detail>
        <sf:InvalidFieldFault xsi:type="sf:InvalidFieldFault" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <sf:exceptionCode>INVALID_FIELD</sf:exceptionCode>
          <sf:exceptionMessage>Field name provided, IFCS__c does not match an External ID for Contact</sf:exceptionMessage>
          <sf:row>-1</sf:row>                                                                                      
          <sf:column>-1</sf:column>
        </sf:InvalidFieldFault>
      </con1:detail>
      <con1:http-response-code>500</con1:http-response-code>

 Any help will be great and thanks in advance.