You need to sign in to do that
Don't have an account?
smilo33
Javascript/MSXML/SOAP
adamg mentioned code having a code example using Javascript/SOAP. Can I see this?
I would like to see how to use MSXML with Javascript to access the API.
Sorry I'm starting a new thread, but I can't tell if the old thread is still getting attention.
Much thanks,
Samantha
I would like to see how to use MSXML with Javascript to access the API.
Sorry I'm starting a new thread, but I can't tell if the old thread is still getting attention.
Much thanks,
Samantha
http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;555057
strMethodPkg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
strMethodPkg += "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "
strMethodPkg += "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
strMethodPkg += "<soapenv:Header>"
strMethodPkg += "<ns1:SessionHeader soapenv:mustUnderstand=\"0\" xmlns:ns1=\"SforceService\">"
strMethodPkg += "<ns2:sessionId xmlns:ns2=\"urn:enterprise.soap.sforce.com\">{!API_Session_ID}</ns2:sessionId>"
strMethodPkg += "</ns1:SessionHeader>"
strMethodPkg += "</soapenv:Header>"
strMethodPkg += "<soapenv:Body>"
strMethodPkg += "<retrieve xmlns=\"urn:enterprise.soap.sforce.com\">"
strMethodPkg += "<fieldList>Id, AccountNumber, Name, Website</fieldList>"
strMethodPkg += "<sObjectType>Account</sObjectType>"
strMethodPkg += "<ids>{!Account_ID}</ids>"
strMethodPkg += "</retrieve>"
strMethodPkg += "</soapenv:Body>"
strMethodPkg += "</soapenv:Envelope> "
var objXMLHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0")
objXMLHTTP.open("POST", "{!API_Enterprise_Server_URL_30}", false)
objXMLHTTP.setRequestHeader("Content-Type","text/xml")
objXMLHTTP.setRequestHeader("SOAPaction","retrieve")
objXMLHTTP.setRequestHeader("Content-Length", "978")
objXMLHTTP.send(strMethodPkg)
</script>
Hi Samantha,
When I tried to run this script I am getting a JavaScript Error message " System cannot locate the resource specified"
Any Idea what may be the reason ?
das
How do we can get the response. ? I have to get the number of count of a particular field in the database and if I use the 'Query' how do I can access the result from the javascript ??
Can u please help me .....
//send package
objXMLHTTP.send(strMethodPkg)
//see what's in the package
document.write(objXMLHTTP.responseXML.xml)