Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is that writeBody is not generating the correct structure. checking the WSDL shows that the convertLead call is expecting to take 0..n of these structures. (Exception #2 is the hint about this)</p> <pre><code> &lt;element name="convertLead"&gt; &lt;complexType&gt; &lt;sequence&gt; &lt;element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/&gt; &lt;/sequence&gt; &lt;/complexType&gt; &lt;/element&gt; &lt;complexType name="LeadConvert"&gt; &lt;sequence&gt; &lt;element name="accountId" type="tns:ID" nillable="true"/&gt; &lt;element name="contactId" type="tns:ID" nillable="true"/&gt; &lt;element name="convertedStatus" type="xsd:string"/&gt; &lt;element name="doNotCreateOpportunity" type="xsd:boolean"/&gt; &lt;element name="leadId" type="tns:ID"/&gt; &lt;element name="opportunityName" type="xsd:string" nillable="true"/&gt; &lt;element name="overwriteLeadSource" type="xsd:boolean"/&gt; &lt;element name="ownerId" type="tns:ID" nillable="true"/&gt; &lt;element name="sendNotificationEmail" type="xsd:boolean"/&gt; &lt;/sequence&gt; &lt;/complexType&gt; </code></pre> <p>so your writeBody needs to be something like</p> <pre><code>def writeBody(self, s): s.startElement(_partnerNs, "leadConverts") s.writeElementString(_partnerNs, "convertedStatus", self.__convertedStatus) s.writeElementString(_partnerNs, "doNotCreateOpportunity", self.__doNotCreateOpportunity) s.writeElementString(_partnerNs, "leadId", self.__leadId) ... s.endElement() </code></pre> <p>If you want to do bulk lead convert, then you'll need to generate multiple instance of this structure for each lead conversion you want to do.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload