Skip to content

Instantly share code, notes, and snippets.

Alex Edelstein alexed1

Block or report user

Report or block alexed1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View initialPBWorkflow.xml
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="">
View Flovarda Kadabra.xml
<?xml version="1.0" encoding="UTF-8"?><Flow xmlns="">
alexed1 / ApexClassDeployFromApex
Created May 16, 2020
Deploying ApexClass metadata from Apex
View ApexClassDeployFromApex
public static MetadataService.DeployOptions getDeployOptions(){
MetadataService.DeployOptions lvDeployOption = new MetadataService.DeployOptions();
lvDeployOption.allowMissingFiles = false;
lvDeployOption.autoUpdatePackage = true;
lvDeployOption.checkOnly = false;
lvDeployOption.ignoreWarnings = true;
lvDeployOption.performRetrieve = false;
lvDeployOption.purgeOnDelete = false;
View workflow - WithoutSpecifiedChangesCheckbox
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="">
View sobject introspect
global with sharing class DeserializeJSONtoSObject {
global static List <Results> parse (List<Requests> requestList) {
System.debug('entering object json parse');
//Wrap the Results object in a List container (an extra step added to allow this interface to also support bulkification)
List<Results> responseWrapper= new List<Results>();
View gist:7973adfccdf1c9377e702a4878644d8d
global with sharing class GetLookupCollection {
// convert to a Set of ID's
// setup the query
global static List <Results> get(List<Request> requestList) {
List<Results> responseWrapper = new List<Results>();
View send rich email cpe.js
import {LightningElement, wire, api, track} from 'lwc';
import {getObjectInfo} from 'lightning/uiObjectInfoApi';
export default class FlowCombobox extends LightningElement {
@api name;
@api label;
@api required = false;
@api flowContextFilterType;
@api valueIsCollection;
@api maxWidth;
View SendRichEmail Original
public with sharing class SendHTMLEmail {
@invocableMethod(label='Send HTML Email')
public static List<Response> SendEmail(List<Request> requests) {
String HTMLbody = requests[0].HTMLbody;
String plainTextBody = requests[0].plainTextBody;
String subject = requests[0].subject;
String replyEmailAddress = requests[0].replyEmailAddress;
String senderDisplayName = requests[0].senderDisplayName;
View Invocable Action with Generics 'GetFirstFromCollection'
public with sharing class GetFirstFromCollection {
public static List <Results> execute (List<Requests> requestList) {
System.debug('entering getFirst');
List<SObject> inputCollection = requestList[0].inputCollection;
Boolean enforceSingle = requestList[0].enforceSingleMember;
//TODO if enforceSingle is set, throw an error if count of input collection is not 1
View Invocable Action with Generics 'GenerateCollectionReport'
public with sharing class GenerateCollectionReport {
public static List <Results> generateReport(List<Requests> requestList) {
List<Account> inputCollection = requestList[0].inputCollection;
String shownFields = requestList[0].shownFields;
String reportString = '';
if (inputCollection != null && !inputCollection.isEmpty() && shownFields != null) {
reportString += 'Collection Type: ' + inputCollection[0].getSObjectType().getDescribe().getName() + '\n\n';
List<String> shownFieldsArray = shownFields.replaceAll('[^a-zA-Z0-9\\,]', '').split(',');
You can’t perform that action at this time.