Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Web Service - call using suitescript fails!?
Hi there,
I am attempting to run the following suitescript code when a sales order is saved in netsuite.
function connectionsProcess( ) { /* service URL for US address verification web service. */ var strikeIronServiceUrl = 'http://<span style="text-decoration:underline"><span style="color:'#666666'">myurl.co.uk</span></span>/connectionsProcess.asmx'; var salesOrderInternalId = '44332'; var runType = 'internal'; var response = null; var serviceUrl = strikeIronServiceUrl; var soapBody = wrapSoapBody( salesOrderInternalId, runType ); var soapPayload = wrapPayload( soapBody ); var soapHeaders = new Array(); /* Add required SOAP header indicating the intent of this service call. */ soapHeaders['SOAPAction'] = 'http://myurl.co.uk/connectionsProcess.asmx'; response = nlapiRequestURL( strikeIronServiceUrl, soapPayload, soapHeaders ); var responseCode = response.getCode(); var soapText = response.getBody(); var soapXML = nlapiStringToXML( soapText ); var ResponseInfo = nlapiSelectNode( soapXML, "//*[name()='startConnectionsProcessResponse']" ); var ResponseCode = nlapiSelectValue( ResponseInfo, "//*[name()='startConnectionsProcessResult']" ) } function wrapPayload(payload) { var soap = ''; soap += '&lt;soap:Envelope xmlns:soap="<a target="_blank" href="
0