Skip to content

Instantly share code, notes, and snippets.

@rygramer
rygramer / placeOnYourWebsite.html
Created January 8, 2022 01:07
Aura to Embed a Flow in an External Website - code for your website
<script src="https://YOUR-SALESFORCE-SITE-URL.com/lightning/lightning.out.js"></script>
<div id="lightningLocator"></div>
<script>
$Lightning.use("c:embedFlowInExternalWebsiteApp",
function() {
$Lightning.createComponent(
"c:embedFlowInExternalWebsite",
{ },
@rygramer
rygramer / embedFlowInExternalWebsiteApp.app
Created January 8, 2022 01:05
Aura to Embed a Flow in an External Website - .app
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
<aura:dependency resource="c:embedFlowInExternalWebsite"/>
</aura:application>
@rygramer
rygramer / embedFlowInExternalWebsiteController.js
Created January 8, 2022 01:04
Aura to Embed a Flow in an External Website - Controller.js
({
init : function (component) {
var flow = component.find("flowData");
flow.startFlow("YOUR_FLOW_API_NAME");
}
})
@rygramer
rygramer / embedFlowInExternalWebsite.cmp
Created January 8, 2022 01:03
Aura to Embed a Flow in an External Website - .cmp
<aura:component implements="flexipage:availableForAllPageTypes,lightning:availableForFlowActions" access="GLOBAL">
<aura:handler name="init" value="{!this}" action="{!c.init}" />
<lightning:flow aura:id="flowData"/>
</aura:component>

This gist contains multiple files. Each file contains a specific type of Apex or Visualforce comment header.

When code is no longer used, but can not be deleted from your org, add the @deprecated annotation to the File or Method Header.

@rygramer
rygramer / RecordOwnerVerification.cls
Created August 6, 2021 17:28
Pass the record you would like to check, and we will update the record with the fallback User if the original owner is inactive (returning only the active User).
/**
* @Name RecordOwnerVerification
* @Author Kicksaw Consulting, Ryan Mercer
* @Date 2021-06-14
* @Description Pass the record you would like to check, and we will update the record with the fallback User if the original owner is inactive (returning only the active User).
*/
global class RecordOwnerVerification{
/**
* Main method doing the heavy lifting
*/
@rygramer
rygramer / ESP.cls
Created August 6, 2021 17:27
An Account's stack maturity is determined by the bucket in which their email service provider (ESP) is in.
/**
* @Name: ESP
* @Author: Kicksaw
* @Date: 2021-08-02
* @Description: An Account's stack maturity is determined by the bucket in which their email service provider (ESP) is in.
* This class controls the Batchable, Schedulable, and Utility logic surrounding the automation.
*
********************************************************* CHANGE HISTORY *********************************************************
* ModifiedBy Date Reference Num Description
* --------------------------------------------------------------------------------------------------------------------------------
@rygramer
rygramer / QuickBooksCustomer.cls
Created August 4, 2021 00:42
Create QuickBooks Customers from Salesforce Accounts
/**
* @Name: QuickBooksCustomer
* @Author: Kicksaw
* @Date: 2021-08-04
* @Description: Create QuickBooks Customers from Salesforce Accounts
*
********************************************************* CHANGE HISTORY *********************************************************
* ModifiedBy Date Reference Num Description
* --------------------------------------------------------------------------------------------------------------------------------
* Kicksaw, Ryan Mercer 2021-08-04 1 Initial Version
@rygramer
rygramer / DuplicateRecordCheck.cls
Last active November 29, 2021 14:03
Runs the duplicate rules on a particular record or recordId to see if a duplicate record exists.
/**
* @description : Runs the duplicate rules on a particular record or recordId to see if a duplicate record exists.
* @author : Ryan Mercer
* @group : Kicksaw
* @last modified on : 11-27-2021
**/
public with sharing class DuplicateRecordCheck{
/**
* @description Invocable Method that runs the duplicate rules on a particular record or recordId to see if a duplicate record exists.
@rygramer
rygramer / calendly.cls
Last active June 24, 2021 13:11
Map the CalendlyAction__c custom questions & responses to their appropriate warehouse.
/**
* @Name: calendly
* @Author: Kicksaw, Ryan Mercer
* @Date: 2021-06-22
* @Description: Map the CalendlyAction__c custom questions & responses to their appropriate warehouse.
*/
global class calendly{
/**
* @Description Map the CalendlyAction__c custom questions & responses to their appropriate warehouse.
* @Param inputs - List<InputParameters>