Skip to content

Instantly share code, notes, and snippets.


Christian Szandor Knapp Szandor72

View GitHub Profile
View Apex XML2JSON.cls
String xml2json(String xml) {
XmlStreamReader reader = new XmlStreamReader(xml);
JsonGenerator g = Json.createGenerator(true);
Szandor72 / lts-unit-test.MD
Created Apr 20, 2018 — forked from sjurgis/lts-unit-test.MD
How to do actual unit testing in Lightning Testing Service
View lts-unit-test.MD

Expose helper via an public aura:method function in your abstract component's testHelperController.js:

getHelper: function(component, event, helper) {
 if ( $T ) {
  return helper;
 } else {
  throw new Error('API is only supported in test context');
Szandor72 / findDupes
Created Oct 25, 2017 — forked from goravseth/findDupes
invocable apex to find duplicate contacts using the new findDuplicates apex stuff
View findDupes
public class Flow_FindDupes {
@InvocableMethod(label='Get Dupes' description='Returns something')
public static List<Contact> getDuplicateContacts(List<Contact> contacts) {
system.debug('contacts size = ' + contacts.size());
list<sObject> dasContacts = new list<sobject>();
list<Contact> duplicateContacts = new list<Contact>();
Szandor72 /
Created Aug 10, 2017 — 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">