• Patrick Wong
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Why the Duplicate Record Items Trigger can't be run while Duplicate Lead is Created?
Is there any way to get the Translated MasterLabel of the OpportunityStage in Apex Code?
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>
 
Hi,
In SAP, I want to generate a proxy from a Salesforce wsdl file to consume a webservice but when i try to create the proxy from Tcode SE80 in SAP, I got following error:

Background
During proxy generation, an interface description in WSDL format is fetched from the Enterprise Services Builder or from another soource and interpreted. This WSDL document must
describe the whole interface correctly.
==> Display Query
==> Display WSDL Document

Diagnosis
In the WSDL document the object
 "DataCategory"
from the namespace
 "urn:enterprise.soap.sforce.com"
was defined.
However, this refers (directly or indirectly) to itself.

Recursion of this kind in type definitions is not supported.

System Response
Proxy generation is terminated.

Procedure
Avoid recursive type definitions.

As you see in some part of the Salesforce wsdl message, its exception structure consists of recursive type.

          <complexType name="DataCategory">
              <sequence>
                    <element name="childCategories" type="tns:DataCategory" minOccurs="0" maxOccurs="unbounded"/>
                    <element name="label"           type="xsd:string"/>
                    <element name="name"            type="xsd:string"/>
                </sequence>
            </complexType>


How can i handle this problem ? Is there any other syntax to replace the recursive type in Salesforce WSDL file?
Thanks.

 

 
Why the Duplicate Record Items Trigger can't be run while Duplicate Lead is Created?
Why the Duplicate Record Items Trigger can't be run while Duplicate Lead is Created?
Is there any way to get the Translated MasterLabel of the OpportunityStage in Apex Code?