You need to sign in to do that
Don't have an account?
loosing probability value
HI,
I have one custom field in opportunity object. I wrote a java service to update the custom field using sforce 2.0 API. When I update the custom field, the probability field in opportunity is becoming 0%.(old value was 75%). The strange thig is ,I donot even have the permissions to update the probability field and I am only updating the custom field. Can anyone please help to solve this problem
SOAP message to update opportunity custom field
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="salesforce" xmlns:types="salesforce/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<tns:headerStruct id="id1">
<session_id xsi:type="xsd:string">DgvWLp.9JdeTjunkjunkNHD5junkjunk4g0pjOnu5Z7bavh.r9_junkjunk</session_id>
<version xsi:type="xsd:string">2.0</version>
</tns:headerStruct>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<q1:update xmlns:q1="sfconnector:SalesforceConnector">
<version xsi:type="xsd:string">2.0</version>
<session_id xsi:type="xsd:string">DgvWLp.9JdeTjunkjunkNHD5junkjunk4g0pjOnu5Z7bavh.r9_junkjunk</session_id>
<type xsi:type="xsd:string">opportunity</type>
<record href="#id1"/>
</q1:update>
<soapenc:Array id="id1" soapenc:arrayType="tns:mapEntry[2]">
<Item href="#id2"/>
<Item href="#id3"/>
</soapenc:Array>
<tns:mapEntry id="id3" xsi:type="tns:mapEntry">
<key xsi:type="xsd:string">id</key>
<value xsi:type="xsd:string">00600000006veRX</value>
</tns:mapEntry>
<tns:mapEntry id="id2" xsi:type="tns:mapEntry">
<key xsi:type="xsd:string">cf_00N00000006onjt</key>
<value xsi:type="xsd:string">Pending</value>
</tns:mapEntry>
</soap:Body>
</soap:Envelope>
Hi prudhvi,
Why do you have the version and session id in the soap body????????
My Axis 1.1 soap message looks like this:
<?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:commonRequest soapenv:mustUnderstand="0" xsi:type="ns1:headerStruct" xmlns:ns1="salesforce">
<session_id xsi:type="xsd:string">qjunkzKggVlhL</session_id>
<version xsi:type="xsd:string">2.0</version>
</ns1:commonRequest>
</soapenv:Header>
<soapenv:Body>
<ns2:update soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="sfconnector:SalesforceConnector">
<type xsi:type="xsd:string">opportunity</type>
<record xsi:type="soapenc:Array" soapenc:arrayType="ns3:mapEntry[2]" xmlns:ns3="salesforce" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>
<key xsi:type="xsd:string">id</key>
<value xsi:type="xsd:string">00630000000rMjX</value>
</item>
<item>
<key xsi:type="xsd:string">cf_00N30000000c72S</key>
<value xsi:type="xsd:string">C100</value>
</item>
</record>
</ns2:update>
</soapenv:Body>
</soapenv:Envelope>
Message Edited by DevAngel on 01-30-2004 02:44 PM
Hi,
When we developed this few months back, If we didn't put the session_id and version in Body, we used to get an invalid message exception from the Salesforce.com soap server.
Thanks,
Prudhvi