Salesforce.getObjectById()

Get a salseforce object by Id. Returns the entire object.

Requires authentication with username, password, and secret token.

Usage

Hover over inputs/exits for more info.

var Salesforce = require('machinepack-salesforce-expanded');


// Get a salseforce object by Id. Returns the entire object.

Salesforce.getObjectById({

email: 'user@gmail.com',

password: 'demo1234',

token: 'x1x2x3',

objectType: 'Lead',

objectId: '12345',

url: 'https://cs2.salesforce.com/',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Login was not successful

invalidLogin: function () {

 

},

// Object not found for this Id.

notFound: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

email required

Email address used to login to your salseforce account.

'user@gmail.com'
password required

Password used to login to your salseforce account.

'demo1234'
token required

If you do not have one, visit salseforce at My settings > personal > Reset My Security Token.

'x1x2x3'
objectType required

Salseforce object type.

'Lead'
objectId required

Salesforce object Id.

'12345'
url

URL for connecting your salesforce instance, sandbox, etc.

'https://cs2.salesforce.com/'

Exits

error

An unexpected error occurred.

invalidLogin

Login was not successful

notFound

Object not found for this Id.

success

OK.