Skip to content

Instantly share code, notes, and snippets.

@jason-dark
Created July 8, 2018 22:14
Show Gist options
  • Save jason-dark/261f4bc218f338b999fe43c439306666 to your computer and use it in GitHub Desktop.
Save jason-dark/261f4bc218f338b999fe43c439306666 to your computer and use it in GitHub Desktop.
function sfQuery(conn) {
return new Promise((resolve, reject) => {
console.log("🛈 Querying Salesforce");
var queryString = "SELECT Id FROM Contact WHERE Name LIKE 'A%' AND MailingCity = 'California'";
conn.query(contactQueryString, function (e, data) {
if (e) {
console.log(e);
reject(e);
} else {
resolve(data);
}
});
});
}
module.exports = sfQuery;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment