You need to sign in to do that
Don't have an account?
mjkstk
Updates made via SOAP using MS SOAP 3.0
I have many features working using MS Soap 3.0, but having difficulty with update.
I have tried many different SOAP messages, but never get success. I believe the issue is related to the <sObjects> portion. I essentially send:
<update xmlns="urn:enterprise.soap.sforce.com">
Here is a snippet of the code from our XSLT that might help you:
<e:update xmlns:ns3="urn:sobject.enterprise.soap.sforce.com">
<e:sObjects xsi:type="ns3:Note">
<ns3:Id>
<xsl:value-of select="cor:Custom/@cst0:Id"/>
</ns3:Id>
<ns3:Title>
<xsl:value-of select="ap:Text/@PlainText"/>
</ns3:Title>
<ns3:Body>
<xsl:value-of select="ap:NotesGroup/ap:NotesXhtmlData"/>
</ns3:Body>
</e:sObjects>
</e:update>
Hey Michael,
This may help, but not 100% certain. I guess my confusion is when it gets to the sObjects. I am using the MS Soap 3.0 client, and here is my code currently - it is still not working.
n_Namespace="urn:sobject.enterprise.soap.sforce.com"
With global_mySerializer
.Init global_myHTTPConnection.InputStream
.StartEnvelope , "STANDARD"
xml_Str={<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"}
xml_Str=xml_Str & { xmlns:xsd="http://www.w3.org/2001/XMLSchema"}
xml_Str=xml_Str & { xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">}
.WriteXML xml_Str
.StartHeader "None"
.StartHeaderElement "SessionHeader", global_m_Namespace
.StartElement "sessionId", global_m_Namespace
.WriteString <my current session id>
.EndElement
.EndHeaderElement
.EndHeader
.StartBody
.StartElement "update", n_Namespace
' .StartElement "sObjects"
xml_Str={<sObjects xsi:type="ns3:Account" xmlns:ns3="} & n_Namespace & {">}
.WriteXML xml_Str
xml_Str={<ns3:Id>} & global_currentSFDCrecord & {</ns3:ID>}
.WriteXML xml_Str
xcounter=0
Forall y In type_value
xml_Str={<ns3:} & y & {>} & new_Values(xcounter) & {<ns3:} & y & {>}
.WriteXML xml_Str
xcounter=xcounter+1
End Forall
xml_Str={</sObjects>}
.WriteXML xml_Str
' .EndElement
.EndElement
.EndBody
.EndEnvelope
End With
global_myHTTPConnection.EndMessage
global_myReader.Load global_myHTTPConnection.OutputStream
login_resp=global_myReader.RPCStruct.baseName
login_respv=global_myReader.RPCResult.text
Msgbox global_myReader.body.xml
Right now it ends in a fault message. Really frustrating. What I am attempting to do is, using the SFDC id for the Account, adding a value to a field (the field may or may not already have a value though).
Thanks in advance.
Mike Kinder
Hey Michael (and any others),
Thanks for all your help, but I was able to resolve this issue.
Mike Kinder
mike.kinder@plantemoran.com