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
BlueteeBluetee 

partner.wsdl duplicated ID field

Hello!
 
I am now using partner.wsdl and the TIBCO BW to do some small tests.
 
I discovered that, when I am doing query using the string "Select Id, FirstName from Contact", the returned soap message has two Id fields with the exactly same value. But if the query string is "Select FirstName from Contact", then the duplicate Id is gone.
 
For this have already caused a duplicate field problem in my bw process in some situation when I configure a process to do upsert, I would like to know, why it returns 2 Id fields back
 
Are those two fields actually different role but carrying the same value? However, it seems not right to me, because the field names are exactly the same. But if so, how or in what kinds of situation will I use this 'duplicatied' Id field?
SuperfellSuperfell
The ID element is repeated to make programatic use of the partner API easier. The WSDL defines a common ID element in the base SObject definition, in addition, for query, we'll put every element you specified in your query in the any collection, this makes it easy to index into the any collection to find a field value based on your select list. That does mean for queries that select the Id field it'll appear twice, once in the base sobject defintion and a 2nd time in the any collection.