Skip to content

Instantly share code, notes, and snippets.

@martyychang
martyychang / DependentPicklistDemoController.cls
Last active September 27, 2017 03:11
Demonstration of how to configure dependent picklists in Lightning on the Salesforce1 Platform, using features currently available in the Winter '15 beta
public class DependentPicklistDemoController {
@AuraEnabled
public static List<Contact> getContacts() {
return [
SELECT Id, Name, AccountId, Account.Name
FROM Contact
LIMIT 200
];
}
@gati
gati / where-ive-been.html
Created September 7, 2014 16:53
Visualize lat/lon points
<!doctype html>
<html>
<head></head>
<body>
<!--
Obviously this is not production code. Really I was just rendering a map so I could take a screenshot and post it on Twitter,
and this was faster than using some Python mapping library (and looks way nicer!). So no judgement, mkay?
This plots points taken from my Google Location data, formatted using this handy Python script:
@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");