Skip to content

Instantly share code, notes, and snippets.

View allisonletts's full-sized avatar

Allison Letts allisonletts

View GitHub Profile
# yaml-language-server: $schema=https://raw.githubusercontent.com/SFDO-Tooling/Snowfakery/main/schema/snowfakery_recipe.jsonschema.json
- object: Campaign
count: 10
fields:
Name:
fake: catchphrase
StartDate:
date_between:
start_date: '2021-01-01'
end_date: '2023-12-31'
# I've got a Full Fee and a Discounted Fee, which both defaulted in the old system to '.00'
# so now I want to see whether I actually need to create ticket prices for this event.
SELECT
Id, EventType,
Cast(COALESCE(NULLIF(FullFee,'.00'), (DiscFee,'.00'), 0.00) AS Double (8,2)) AS TopTicketPrice
FROM
Events
//Use below code snippet to Schedule Async Framework to run every 15 minutes and clear the queue
//Scheduler Run every 15 mins
AsyncApexFrameworkScheduler obj1 = new AsyncApexFramework();
AsyncApexFrameworkScheduler obj2 = new AsyncApexFramework();
AsyncApexFrameworkScheduler obj3 = new AsyncApexFramework();
AsyncApexFrameworkScheduler obj4 = new AsyncApexFramework();
System.schedule('AsyncApexFramework 1', '0 0 * * * ?', obj1);
System.schedule('AsyncApexFramework 2', '0 15 * * * ?', obj2);
System.schedule('AsyncApexFramework 3', '0 30 * * * ?', obj3);
@allisonletts
allisonletts / ContentManager.js
Created May 26, 2021 16:36 — forked from amitastreait/ContentManager.js
How to preview files in Lightning Community using LWC
import { api, LightningElement, track, wire } from 'lwc';
import getContentDetails from '@salesforce/apex/ContentManagerService.getContentDetails';
import deleteContentDocument from '@salesforce/apex/ContentManagerService.deleteContentDocument';
import { NavigationMixin } from 'lightning/navigation';
const columns = [
{ label: 'Title', fieldName: 'Title', wrapText : true,
cellAttributes: {
iconName: { fieldName: 'icon' }, iconPosition: 'left'
}