Skip to content

Instantly share code, notes, and snippets.

View vkeenan's full-sized avatar
💭
Looking for Salesforce Devops Connections!

Vernon Keenan vkeenan

💭
Looking for Salesforce Devops Connections!
View GitHub Profile
@stomita
stomita / SimpleSalesforceConnection.js
Created May 25, 2011 08:40
A Google Apps Script, which simply connects and fetches data from Salesforce RESTful API with OAuth authentication.
/**
* 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");
# Proudly supplied by Salesforce Way Site: https://salesforceway.com
# This cheatsheet contains the most often used sf(v2) commands to get a jumpstart.
# Hint. It is highly recommended to use `sf search` to search for commands, examples, parameters.
# More commands can be found in the official sites:
# https://developer.salesforce.com/docs/atlas.en-us.244.0.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_unified.htm
# The old "sfdx" cheatsheet is stored below:
# https://gist.github.com/XiXiaoFinland/e22aad45caf67df33aeafae085810570