function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChrisLivelyChrisLively 

INVALID_TYPE error on update

Hi,

  I'm receiving an INVALID_TYPE exception when attempting to perform an update call on an Opportunity record.  The exception message is "Must send a concrete entity type." 

Any thoughts on what this means?

 

Thanks,

chris.

adamgadamg
Typically it means you aren't setting the object type in your SOAP message.

What toolkit, language and platform are you using? Are you using the Partner or Enterprise WSDL?
ChrisLivelyChrisLively

I'm using sforce 3.0, Enterprise WSDL, Delphi 7, on win2k. 

Hmm.. I don't see where I can set the Type in the Enterprise WSDL definition for sObject, however I just noticed that the partner WSDL file has a slightly different definition for sObject with an additional field for Type_. 

Should I just use the partner definition for sObject?

adamgadamg
Hmm. If you are using Enterprise WSDL, you shouldn't have to set the type - its likely an issue with how Delphi is interpreting the WSDL - the best bet is to capture the XML message and post it here (as an attachement) for us to look at, or to compare with the reference messages.
ChrisLivelyChrisLively

Well, your right.  The request is screwed up.  Below is a snapshot that I trimmed most of the unnecesary fields out of.  I compared this to the 3.0 docs and found that the <sObjects.. > line doesn't contain the xsi:type declaration.  Besides that do you see any other issues?

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Header>
  <SessionHeader xmlns="urn:enterprise.soap.sforce.com">
   <sessionId>***REMOVED***</sessionId>
  </SessionHeader>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
  <update xmlns="urn:enterprise.soap.sforce.com">
   <sObjects xmlns="urn:sobject.enterprise.soap.sforce.com">
    <fieldsToNull></fieldsToNull>
    <Id>006300000015sp5AAA</Id>
    <AccountId></AccountId>
    <Act_Builder_Fee__c>0</Act_Builder_Fee__c>
    <Act_Realtor_Referral_Fee__c>0</Act_Realtor_Referral_Fee__c>
    <Amount>0</Amount>
    <Builder_Contract_Date__c xmlns="" xsi:nil="true"/>
    <Built_by__c></Built_by__c>
    <CSS_Code__c></CSS_Code__c>
   </sObjects>
  </update>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>