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
/** | |
* Connect and fetch Salesforce data via OAuth | |
*/ | |
function queryDataFromSalesforce() { | |
// Read OAuth consumer key / secret of this client app from script properties, | |
// which can be issued from Salesforce's remote access setting in advance. | |
var sfConsumerKey = ScriptProperties.getProperty("sfConsumerKey"); | |
var sfConsumerSecret = ScriptProperties.getProperty("sfConsumerSecret"); | |
if (!sfConsumerKey || !sfConsumerSecret) { | |
Browser.msgBox("Register Salesforce OAuth Consumer Key and Secret in Script Properties"); |