Skip to content

Instantly share code, notes, and snippets.

View Szandor72's full-sized avatar

Christian Szandor Knapp Szandor72

View GitHub Profile
@Szandor72
Szandor72 / NestedActionsInLoops.flow-meta.xml
Created April 2, 2023 13:41
A deliberately bad flow.
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>57.0</apiVersion>
<description>A deliberately bad flow.</description>
<environments>Default</environments>
<interviewLabel>NestedActionsInLoops {!$Flow.CurrentDateTime}</interviewLabel>
<label>NestedActionsInLoops</label>
<loops>
<name>LoopAssets</name>
<label>LoopAssets</label>
@Szandor72
Szandor72 / challenge.js
Last active March 23, 2021 10:02
A tiny coding challenge
// Given
let array = [0, 1, 2, 3, 4, 5, 6];
let elementsToMove = [2, 3, 4];
// Tasks
// 1)
// Given an arbitrary new index, re order the array so that
// elementsToMove is moved to the correct position
@Szandor72
Szandor72 / README.md
Created August 10, 2017 11:54 — forked from mattandneil/build.xml
Salesforce Organization Destroy - Ant Script

Salesforce Organization Destroy - Ant Script

This script searches and destroys (most) metadata in an organization. Use cases include ISV package development and testing within Developer Edition and Sandbox environments.

Usage: (paste the macrodef XML into your build file)

<target name="destroy">
    <destroy
 username="${sf.username}"
# Uncrustify 0.60
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
// cmp
<aura:component access="global" implements="lightning:actionOverride,force:hasRecordId,force:hasSObjectName,lightning:isUrlAddressable"
description="proof of concept cmp">
<aura:attribute name="contextId" type="String"/>
<aura:attribute name="windowURL" type="String"/>
<aura:handler name="init" value="this" action="{!c.init}"/>
<lightning:card title="Details">
<div class="slds-p-around_medium">
<p>RecordId (should be empty for new action): <b>{!v.recordId}</b></p>
public class JSONObject {
public class JSONObjectException extends Exception {}
public static String NAMESPACEPREFIX {
get {
if (namespacePrefix == null) {
namespacePrefix = JSONObject.class.getName().substringBefore('.JSONObject');
namespacePrefix = namespacePrefix.length() > 0 && namespacePrefix != 'JSONObject' ? namespacePrefix + '__' : '';
}
return namespacePrefix;
@Szandor72
Szandor72 / project-scratch-def.json
Created February 5, 2019 12:38
project-scratch-def.json
{
"edition": "Enterprise",
"features" : ["ExpandedSourceTracking"],
"orgPreferences" : {
"enabled" : [
"S1DesktopEnabled",
"Translation",
"PathAssistantsEnabled"
],
"disabled" : [
{
"packageDirectories": [
{
"path": "myChangeSetName",
"default": true,
"package": "myChangeSetName"
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
@Szandor72
Szandor72 / Pretty Cards for Flow
Created September 13, 2018 12:18
A rough sketch how to make individual fields pretty in a flow using a lightning card
<aura:component implements="lightning:availableForFlowScreens" access="global">
<aura:attribute name="valueProvidedByFlow" type="String" />
<aura:attribute name="labelForValue" type="String" />
<aura:attribute name="type" type="String" description="currency, decimal, text supported"/>
<aura:attribute name="icon" type="String" default="standard:account" description="any icon from slds"/>
<lightning:card iconName="{!v.icon}" >
<aura:set attribute="title">
{!v.labelForValue}
<aura:if isTrue="{!v.type == 'currency'}">
@Szandor72
Szandor72 / Pretty Cards for Flow
Created September 13, 2018 12:18
A rough sketch how to make individual fields pretty in a flow using a lightning card
<aura:component implements="lightning:availableForFlowScreens" access="global">
<aura:attribute name="valueProvidedByFlow" type="String" />
<aura:attribute name="labelForValue" type="String" />
<aura:attribute name="type" type="String" description="currency, decimal, text supported"/>
<aura:attribute name="icon" type="String" default="standard:account" description="any icon from slds"/>
<lightning:card iconName="{!v.icon}" >
<aura:set attribute="title">
{!v.labelForValue}
<aura:if isTrue="{!v.type == 'currency'}">