Skip to content

Instantly share code, notes, and snippets.

View dsharrison's full-sized avatar

Derrek Harrison dsharrison

View GitHub Profile
dsharrison / MyOverrideClass.cls
Last active January 23, 2018 23:11
Reproduction components for a Spring '18 issue with virtual classes and lightning
public class MyOverrideClass extends MyVirtualClass {
public override String getName() {
return 'MyOverrideClass';
public override Object getObj() {
return 'Hello World';
dsharrison / DummyController.cls
Last active December 13, 2017 21:22
Reproduction for Proxy behavior moving from non-locker component to locker component
public class DummyController {
public static Boolean getFalse() {
return false;
<aura:application extends="ltng:outApp" >
<aura:dependency resource="c:recordViewRepro" />
<apex:page controller="KGRenewal.ECommerceCartController" showHeader="true" sidebar="true">
dsharrison /
Created February 27, 2017 18:43
Transfer custom cookies in a community between Lightning and Visualforce with Locker Service enabled.
<apex:page showHeader="false" sidebar="false">
Replace <your_resource> with the name of the static resource with
your application files in it. This assumes that you are using a zipped static
resource with your javascript files in a 'js/' folder.
<apex:includeScript value="{!URLFOR($Resource.<your_resource>, '/js/transfer-session.js')}" />
dsharrison / LSTestButton.cmp
Created November 30, 2016 03:32
Reduced test case for locker service dynamic component DOM access.
<aura:component implements="forceCommunity:availableForAllPageTypes" access="GLOBAL">
<!-- public attributes -->
<aura:attribute name="childCmp" type="Aura.Component" access="PUBLIC"/>
<!-- component event handlers -->
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<!-- markup -->
<div aura:id="view">
dsharrison / lightningInputRepro.cmp
Last active October 9, 2016 16:35
A reduced test case for the issues with <lightning:input /> bindings
<aura:component implements="force:appHostable">
<!-- public attributes -->
<aura:attribute name="myObj" type="Account" default="{Name: '', Type: ''}" access="PUBLIC" />
<!-- body markup -->
<c:lightningInputReproFields record="{!v.myObj}" />
<lightning:button label="Update Object" onclick="{!c.updateObj}" />
<lightning:button label="Update Name" onclick="{!c.updateName}" />
dsharrison /
Last active December 13, 2015 20:08
Controller and visualforce page to demonstrate missing records with UserRecordAccess query.
<apex:page controller="UserRecordAccessDebugCtrl" showHeader="true" sidebar="true">
Load this page with a record in the 'id parameter as users with varying record access
<br />
<apex:selectList value="{!userId}" size="1">
<apex:selectOptions value="{!userOptions}" />
<apex:actionSupport event="onchange" rerender="debug" />