Skip to content

Instantly share code, notes, and snippets.

View mikesimps's full-sized avatar

Mike Simpson mikesimps

View GitHub Profile
@mikesimps
mikesimps / Analytics Query Table
Last active June 22, 2022 18:49
Bulk Update Payment With Bank Account Scheduled Function
SELECT "Customer ID" "id"
FROM "Customers (Zoho Finance)"
WHERE "Can pay via Bank Account" = false
AND "Status" = 'Active'
LIMIT 1500
@mikesimps
mikesimps / selectcb.js
Last active October 1, 2020 18:42
Select all PermissionSet or Profile Checkboxes
javascript:(function() {
/*Original Developer: Anthony Marks (https://trailblazer.me/id/marksa)*/
/*Cover off both a profile or a permission set...*/
let readCheckBoxes = document.querySelectorAll("input[id^=display_]");
let editCheckBoxes = document.querySelectorAll("input[id^=edit_]");
if (readCheckBoxes.length===0) {
readCheckBoxes = document.querySelectorAll("input[id$=read_ck]");
}
if (editCheckBoxes.length===0){
@mikesimps
mikesimps / create_lead_from_bookings.dg
Created September 25, 2020 15:48
Create a Zoho CRM Lead Record from a Zoho Bookings event
// You can get the booking info as below using bookingInfo map (passed automatically)
// info bookingInfo;
leadInfo = map();
moreInfo = bookingInfo.get("customer_more_info"); // contains custom field values for bookings workspace
// Assume the first name ends at the first space.
// Won't work for all names, but if you want that level of accuracy, probably better to ask for them in separate fields
name = bookingInfo.get("customer_name");
firstSpace = name.find(" ");
@mikesimps
mikesimps / example commands for usage
Created March 20, 2020 19:52
Mass Action Scheduler Soql that can be used with force:data:tree:export to populate scratch orgs with configurations
sfdx force:data:tree:export -d data -p -x mas -q scripts/soql/mass_action_scheduler.soql
sfdx force:data:tree:import -p data/mas-dca_mass_action__Mass_Action_Configuration__c-plan.json
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<applicationVisibilities>
<application>Groundwire_Volunteers</application>
<visible>true</visible>
</applicationVisibilities>
<description>Permissions granted to the internal employees of the non-profit</description>
<fieldPermissions>
<editable>false</editable>
<field>Campaign.EndDate</field>
@mikesimps
mikesimps / extensions.list
Created June 26, 2019 10:02
Extension List for code-server-sfdx
eamodio.gitlens
maosantaella.night-wolf
esbenp.prettier-vscode
alefragnani.bookmarks
grapecity.gc-excelviewer
@mikesimps
mikesimps / .zshrc
Last active February 5, 2023 14:24
ZSH RC
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@mikesimps
mikesimps / delete.anonapex
Created November 15, 2018 13:48
Delete Records From Dev Org (or Small Org)
delete [select id from Case];
delete [select id from Contact];
delete [select id from Opportunity];
delete [select id from Account];
delete [select id from Lead];
delete [select id from Campaign];
delete [select id from Solution];
delete [select id from Task];
delete [select id from EmailMessage];
@mikesimps
mikesimps / repositories.json
Created October 13, 2018 23:01
Test Sources for open-force website
[{
"type": "repository",
"url": "https://github.com/open-force/website",
"platform": "github"
},
{
"type": "gist",
"name": "PermissionSets",
"url": "https://gist.github.com/mikesimps/6427ea434581058a14fd3b084b87a5ff",
"platform": "github"
@mikesimps
mikesimps / PermissionSet1.xml
Last active August 28, 2018 15:21
Sample PermissionSet XML Files for Testing sfdx-collate
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<applicationVisibilities>
<application>Application1</application>
<visible>true</visible>
</applicationVisibilities>
<applicationVisibilities>
<application>Application2</application>
<visible>false</visible>
</applicationVisibilities>