Created
December 23, 2018 16:46
-
-
Save yasarshaikh/6b4614fa31ddbdece7100a82dd7b05c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************************** | |
* This file is a node js file. Following are the steps: | |
* 1. We need to install node js & npm | |
* 2. We need to install soap module - | |
* npm install soap | |
* 3. We need to import wsdl from Salesforce org. | |
SF Org-> Setup-> Api->Enterprise/partner wsdl->Generate | |
* 4. We need to import that in same directory of node file. | |
* 5. This program execution gets easy with VS Code editor | |
* Ref: https://blog.enree.co/2013/11/nodejs-salesforce-soap-ws-how-to.html | |
*****************************************/ | |
var soap= require('soap'); | |
var url = './sf-soap-enterprise-wsdl.wsdl'; | |
soap.createClient(url, function(err, client) { | |
console.log('Client created'); | |
//console.log(client.SforceService.Soap); //all methods usable in the stub | |
client.login({ | |
username: 'username_Of_same_salesforce_org', | |
password: 'password_with_security_token' | |
}, function(err, result, raw){ | |
if(err) console.log(err); | |
else console.log(result); | |
console.log(raw); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment