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
Patrick WongPatrick Wong 

Sorting Sequence of result columns from Enterprise Query

hi,

We have follow the below guide to create a Enterprise Query to retrieve the opportunities data.
https://developer.salesforce.com/page/Enterprise_Query
We found that the sequence of return columns are not equal to the sequence of the SELECT statement as our request.
Can we control the sequence of the result columns ?

Thanks.

Our Request:
<?xml version="1.0" encoding="UTF-8"?>
-<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-<soapenv:Header>
-<urn:SessionHeader>
<urn:sessionId>???????????????????</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
-<soapenv:Body>
-<urn:query>
<urn:queryString>SELECT ID,ACCOUNTID,NAME,STAGENAME,AMOUNT,CLOSEDATE,CURRENCYISOCODE,OWNERID,EDD__C,COB__C,BU__C,OPPORTUNITYNO__C,EDDENDDATE__C,PROBABILITY,NUMBER_OF_FUNNEL_STATUS__C,COMPETITOR__C,OTHERCOMPETITOR__C,PROJECTSTATUSUPDATE__C,ENTERON__C,SHAREDPROJECTGROUPING__C,LEADSOURCE,CREATEDDATE__C,SHIPPING_ADDRESS__C,TENDER__C,TENDERLAUNCHDATE__C,LOSSREASON__C,WINNINGCOMPANY__C,COMMENTS__C,ACCOUNT.SAPCUSTOMERCODE__C,ACCOUNT.NAME FROM OPPORTUNITY limit 1</urn:queryString>
</urn:query>
</soapenv:Body>
</soapenv:Envelope>

The response from Salesforce:
<?xml version="1.0" encoding="UTF-8"?>
-<soapenv:Envelope xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:enterprise.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-<soapenv:Header>
-<LimitInfoHeader>
-<limitInfo>
<current>94</current>
<limit>5000000</limit>
<type>API REQUESTS</type>
</limitInfo>
</LimitInfoHeader>
</soapenv:Header>
-<soapenv:Body>
-<queryResponse>
-<result>
<done>true</done>
<queryLocator xsi:nil="true"/>
-<records xsi:type="sf:Opportunity">
<sf:Id>006O000000568GQIAY</sf:Id>
-<sf:Account xsi:type="sf:Account">
<sf:Id xsi:nil="true"/>
<sf:Name>Test</sf:Name>
<sf:SAPCustomerCode__c>77263</sf:SAPCustomerCode__c>
</sf:Account>
<sf:AccountId>test</sf:AccountId>
<sf:Amount>105000.0</sf:Amount>
<sf:BU__c>test</sf:BU__c>
<sf:COB__c>test</sf:COB__c>
<sf:CloseDate>2015-04-13</sf:CloseDate>
<sf:CreatedDate__c>2014-12-30T04:31:24.000Z</sf:CreatedDate__c>
<sf:CurrencyIsoCode>HKD</sf:CurrencyIsoCode>
<sf:EDD__c>2015-04-23</sf:EDD__c>
<sf:EnterON__c>false</sf:EnterON__c>
<sf:Name>testG</sf:Name>
<sf:Number_of_Funnel_Status__c>2.0</sf:Number_of_Funnel_Status__c>
<sf:OpportunityNo__c>1420683</sf:OpportunityNo__c>
<sf:OwnerId>000000001y3rrIAA</sf:OwnerId>
<sf:Probability>10.0</sf:Probability>
<sf:ProjectStatusUpdate__c>Submit proposal,</sf:ProjectStatusUpdate__c>
<sf:Shipping_Address__c>test</sf:Shipping_Address__c>
<sf:StageName>2.Direct Contact with Client</sf:StageName>
<sf:Tender__c>false</sf:Tender__c>
</records>
<size>1</size>
</result>
</queryResponse>
</soapenv:Body>
</soapenv:Envelope>
 
ShashankShashank (Salesforce Developers) 
Could you please check if the same behavior is seen in the latest version 32.0 of the API?