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
jvjv 

Sample Soap Msg (Request & Response) for Creating an Opportunity

The API doc has an example SOAP msg (request & response) for creating an Account.  Could someone please post an example SOAP msg (request & response) for creating an Opportunity. 

Thanks,
Jason

 

DevAngelDevAngel

Hi jv,

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
      <soapenv:Header> 
         <ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="SoapService">  
            <ns2:sessionId xmlns:ns2="urn:enterprise.soap.sforce.com">0XfofujfT7
</ns2:sessionId> 
         </ns1:SessionHeader>
      </soapenv:Header>
      <soapenv:Body> 
         <create xmlns="urn:enterprise.soap.sforce.com">  
            <sObjects xsi:type="ns3pportunity"
xmlns:ns3="urn:sobject.enterprise.soap.sforce.com">   
               <ns3:Name>New Opp</ns3:Name>   
               <ns3:Amount>500000.00</ns3:Amount>   
               <ns3escription>Opportunity Description goes here</ns3escription>     
            </sObjects> 
         </create>
      </soapenv:Body>
   </soapenv:Envelope>