With the help of enterprise wsdl, I have been trying to make upsert call in Contact where I need to relate the contact with Account . I have an external Id field on Account and trying to use it for upsert.

I am getting the below Error.

INVALID_TYPE Must send a concrete entity type. -1 -1

Below is the request, I am making....please let me know whats wrong here. I am making this request as sys admin.. and have all permission for this object.

            <urn:sObjects xsi:type="urn1:Contact"> <!--Zero or more repetitions:--> 
            <Job_Title_HDS__c>Account Manager</Job_Title_HDS__c>
            <Email>[email protected]</Email>


2 Answers 2


Just played around this and there is unknown property of nesting parent structure in child object to create child object with parent external Id .

Here is the sample Create Call on contact that I tried by passing Account external Id.Please note you can still use create call only no need for upsert as you don't have externalId for contact.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
     <urn:sObjects xsi:type="urn1:Contact"> <!--Zero or more repetitions:-->
       <!--You may enter ANY elements at this point-->
        <urn:Account xsi:type="urn1:Account"> <!--Zero or more repetitions:-Here I have nested Account Structure so that it helps to associate Account directly-> 

Here is a small video demonstrating this

Video demonstration

  • Thanks Mohith. One more question , how can we do it in case of Custom Object. I have custom object lookup on contact, I need to do the same for that . . Custom object field name is Preferred_Country__c which a lookup to Region__C object....Region object also has a external id. <urn:Preferred_Country_HDS__r xsi:type="urn1:Preferred_Country_HDS__c"> <Test_external_Id__c>India</Test_external_Id__c> </urn:Preferred_Country_HDS__r> Commented Nov 3, 2014 at 6:12
  • Thanks Mohith . .I have resolved this for custom object. btw, Nice video.. Commented Nov 3, 2014 at 6:29
  • Ankit you may like to upvote and mark answered to help others Commented Nov 3, 2014 at 6:39
  • 1
    Sure. It should help other. I could not find a single example of nested object in Upsert call. Commented Nov 3, 2014 at 6:44

Below is the solution to insert the records and populate the Lookup field with the help of external id.

<urn:Account xsi:type="urn1:Account">  
                <urn:Preferred_Country_HDS__r xsi:type="urn1:Region_HDS__c">  

here in first 3 lines,

  i am giving account object external Id Information ,and after that custom oject external Id information...
<urn:Lookupfieldname  xsi:type="urn1:sobjectName">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .