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
PrasadBabuPrasadBabu 

Message Structure for Quotations for UPSERT call

Hi,
 
Currently i am working on UPSERT call to SFDC for updating the Quotations from my legacy machine.
Can any one tell me whhat should be the sObject structure for doing it.
I am using below structure,
 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"><urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
  <urn:sessionId>session ID here</urn:sessionId>
</urn:SessionHeader></SOAP-ENV:Header><SOAP-ENV:Body>
<tns1:upsert xmlns:tns1="urn:enterprise.soap.sforce.com" xmlns:ens="sobject.enterprise.soap.sforce.com" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="urn:sobject.partner.soap.sforce.com">
  <urn:externalIDFieldName>SAP_EXTERNAL_ID__C</urn:externalIDFieldName>
  <urn:sObjects xsitype="Open_Service_Order__c">
    <ORDER_DESCRIPTION__c>testsdasdfa</ORDER_DESCRIPTION__c>
    <NAME>test</NAME>
    <ORDER_STATUS__c></ORDER_STATUS__c>
    <ORDER_TYPE__c>asdfasdf</ORDER_TYPE__c>
    <WBS_ELEMENT_PROJECT_ID__c>asdfasdf</WBS_ELEMENT_PROJECT_ID__c>
    <Warranty_Case__c>asdfasdfasdf</Warranty_Case__c>
     <SAP_EXTERNAL_ID__C>asdfasdfasdf</SAP_EXTERNAL_ID__C>
  </urn:sObjects>
</tns1:upsert></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
but i am getting response like "Id value of incorrect type:98578452005"
 
Please help me out in this.
 
Thanks in advance,
Prasad Babu.


Message Edited by PrasadBabu on 01-23-2008 03:29 AM
SuperfellSuperfell
Based on the error & request, i'd say that the Warranty_Case__c is a lookup field, so you need to provide the salesforce.com 18 character Id, or use a nested object to indicate the external id value of the related object.
PrasadBabuPrasadBabu
Thanks Simon.
 
Could you please tell me where i can get the clue on how the Warranty_Case__c should be nested (How the structure should look like?) so that i can make UPSERT call to SFDC?
 
Thanks,
Prasad Babu.
 
 
SuperfellSuperfell
Instead of <Warrenty_case__c>12345</Warrenty_case__c> you'd have
<Warrenty_case__r>
<some_ext_id__c>>9876</some_ext_id__c>
</Warrenty_case__r>