This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public without sharing virtual class TriggerHandler { | |
/** VARIABLES **/ | |
// static map of handlername, times run() was invoked | |
private static Map<String, LoopCount> loopCountMap; //Map of handlername to the number of times run() was invoked | |
private static Set<String> bypassedHandlers; //Set of handlers who will be bypassed | |
private List<Business_Unit_Data__mdt> businessUnitDataList; //List of the business unit metadata records for an object | |
private String objectName; //Api name of the object on which triggger is running | |
private Map<String,Map<Id,sObject>> oldBusinessRecordMap; //Map of Business Unit name to the corresponding trigger.oldMap | |
private Map<String,Map<Id,sObject>> newBusinessRecordMap; //Map of Business Unit name to the corresponding trigger.newMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Flow xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>56.0</apiVersion> | |
<assignments> | |
<name>Assign_Knowledge_Prefill_Info</name> | |
<label>Assign Knowledge Prefill Info</label> | |
<locationX>176</locationX> | |
<locationY>758</locationY> | |
<assignmentItems> | |
<assignToReference>knowledgeArticle.Title</assignToReference> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const lastItemInMap = map => Array.from(map).pop(); | |
export const lastKeyInMap = map => Array.from(map.keys()).pop(); | |
export const lastValueInMap = map => Array.from(map.values()).pop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author: Shawn Butterfield | |
* Utility class for URI (URL/URN/Email) data validation, parsing and matching | |
* Methods for pattern extraction defined by URI standard syntax, here: http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax | |
*/ | |
public class URIUtils { | |
private static final String REGEX_URL_SCHEME = '^([a-zA-Z][a-zA-Z0-9\\+\\.\\-]+):'; | |
private static final String REGEX_URI_EMAIL_PATTERN = getUrlPatternString(); | |
private static final String[] UNSAFE_CHARS = new String[] { ',','.','&','_','0','Inc','Corp','Co','Ltd' }; // Strings or fragments that can screw up an api request due to encoding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.DateFormat | |
import java.text.SimpleDateFormat | |
// def inputDatTimeString = "2015-07-23T13:46:00.000Z" | |
def inputDatTimeString = "2015-07-23T14:06:00.000Z" | |
DateFormat inputDateTimeFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX") | |
// X instead of 'Z' | |
// inputDateTimeFormat.setTimeZone(TimeZone.getTimeZone("GMT")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement, api, track } from 'lwc'; | |
import { FlowAttributeChangeEvent } from 'lightning/flowSupport'; | |
import pageUrl from '@salesforce/resourceUrl/recaptcha2'; | |
export default class GoogleCapatcha extends LightningElement { | |
navigateTo; | |
@api result = "undefined"; | |
connectedCallback(){ | |
var self = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global without sharing class JobRunner implements Schedulable { | |
Integer intervalMinutes; | |
public JobRunner(Integer intervalMinutes) { | |
this.intervalMinutes = intervalMinutes; | |
} | |
public void execute(SchedulableContext sc) { | |
// Re-schedule ourself to run again in "intervalMinutes" time | |
DateTime now = DateTime.now(); | |
DateTime nextRunTime = now.addMinutes(intervalMinutes); | |
String cronString = '' + nextRunTime.second() + ' ' + nextRunTime.minute() + ' ' + |