Created
July 8, 2018 22:14
-
-
Save jason-dark/261f4bc218f338b999fe43c439306666 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
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