Skip to content

Instantly share code, notes, and snippets.

View quintonwall's full-sized avatar

Quinton Wall quintonwall

View GitHub Profile
@quintonwall
quintonwall / AddressFuture
Created June 17, 2013 17:17
Example of using JSON serialization to pass complex objects to @future handlers in Apex
/**
* Example of using JSON serialization to pass complex objects to @future handlers in Apex
* $author: qwall@salesforce.com
*/
public with sharing class AddressFuture {
public AddressFuture () {
List<String> addresses = new List<String>();
AddressHelper ah1 = new AddressHelper('1 here st', 'San Francisco', 'CA', '94105');
public class RigController {
public RigController(ApexPages.StandardController controller) { }
@RemoteAction
public static String saveRig(String rigtype, String projectdetails, String discussion) {
String status = '';
Rig__c rig = new Rig__c();
<apex:page showHeader="false" sidebar="false" standardController="Rig__c" extensions="RigController">
<apex:stylesheet value="{!URLFOR($Resource.iids, 'iids-min/css/iids.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.iids, 'iids-min/css/responsive.css')}"/>
<script type="text/javascript">
Visualforce.remoting.timeout = 120000; // Set timeout at page level
var j$ = jQuery.noConflict();
function saveRig() {
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>IIDS: Multipage Boilerplate: Page 2</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
System.debug('cli rocks');
@quintonwall
quintonwall / TasksHandler.swift
Created March 23, 2015 18:48
Complete TasksHandler file for Salesforce Wear with Apple Watch Webinar
//
// TaskHandler.swift
// SalesforceWatch
//
// Created by Quinton Wall on 3/23/15.
// Copyright (c) 2015 Salesforce, Inc. All rights reserved.
//
import Foundation
@quintonwall
quintonwall / TaskListController.swift
Created March 23, 2015 18:50
TaskListController completed class for Salesforce Wear Apple Watch webinar
//
// TaskListController.swift
// SalesforceWatch
//
// Created by Quinton Wall on 3/23/15.
// Copyright (c) 2015 Salesforce, Inc. All rights reserved.
//
import Foundation
import WatchKit
@quintonwall
quintonwall / TaskRowController.swift
Created March 23, 2015 18:51
TaskRowController class for Salesforce Wear Apple Watch Webinar
//
// TaskRowController.swift
// SalesforceWatch
//
// Created by Quinton Wall on 3/23/15.
// Copyright (c) 2015 Salesforce, Inc. All rights reserved.
//
import Foundation
import WatchKit
@quintonwall
quintonwall / PushPriceChangeNotification.apex
Created April 11, 2017 07:16
Update to the Dreamhouse app PushPriceChangeNotification Invocable Method to use the native Salesforce Universal Notification framework and iOS10 Rich Media Messaging
public with sharing class PushPriceChangeNotification {
@InvocableMethod(label='Push Price Change Notification')
public static void pushNotification(List<Id> propertyId) {
Id propId = propertyId[0]; // If bulk, only post first to avoid spamming
System.debug('Price updated on property id '+propId);
Property__c property = [SELECT Name, Picture__c, Price__c from Property__c WHERE Id=:propId];
String message = property.Name + '. New Price: $' + property.Price__c.setScale(0).format();
Set<String> userIds = new Set<String>();
@quintonwall
quintonwall / UIDevice.swift
Created September 28, 2017 15:12
UIDevice extension to make working with device basics easier
//
//
//
// Created by QUINTON WALL on 7/31/16.
// Copyright © 2016 Quinton Wall. All rights reserved.
//
import UIKit
public extension UIDevice {