Skip to content

Instantly share code, notes, and snippets.

View agentgill's full-sized avatar

Mike Gill agentgill

View GitHub Profile
/**
* @File Name : Invocable Template
* @Description :
* @Author : agentgill
* @Group :
* @Last Modified By : agentgill
* @Last Modified On : 01/07/2020, 07:55:41
* @Modification Log :
* Ver Date Author Modification
* 1.0 26/05/2020 agentgill Initial Version
/**
* @File Name : BatchScheduler.cls
* @Description : Universal Batch Scheduling Class
* @Author : agentgill
* @Group :
* @Last Modified By : agentgill
* @Last Modified On : 07/06/2020, 17:53:10
* @Modification Log :
* Ver Date Author Modification
* 1.0 07/06/2020 agentgill Initial Version
{
"label": "Beattie Media Executive Dashboard Template",
"mobileDisabled": false,
"state": {
"dataSourceLinks": [],
"filters": [],
"gridLayouts": [
{
"name": "Default",
"numColumns": 12,
@agentgill
agentgill / countries.txt
Created March 12, 2020 11:56 — forked from mantognini/countries.txt
countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@agentgill
agentgill / package.xml
Created January 14, 2020 07:54
Simple package.xml example
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<name>Layout</name>
<members>Account-Account Layout</members>
<members>Asset-Asset Layout</members>
<members>Campaign-Campaign Layout</members>
<members>CampaignMember-Campaign Member Page Layout</members>
<members>Case-Case Layout</members>
<members>Contact-Contact Layout</members>
@agentgill
agentgill / devcontainer.json
Created January 11, 2020 10:41
Docker devcontainer json
{
"name": "Salesforce Project2",
"dockerFile": "Dockerfile",
"extensions": [
"salesforce.salesforcedx-vscode",
"redhat.vscode-xml",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
"settings": {
@agentgill
agentgill / sfdx-project.json
Last active January 11, 2020 10:44
Health Cloud sfdx-project.json with Person Accounts
{
"orgName": "Health Cloud Person Accounts",
"edition": "Developer",
"features": ["ContactsToMultipleAccounts", "PersonAccounts", "HealthCloudUser"],
"settings": {
"orgPreferenceSettings": {
"s1EncryptedStoragePref2": false
}
}
}
@agentgill
agentgill / apex-ruleset.xml
Created December 13, 2019 17:17
Sample PMD Ruleset
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Default ruleset used by the CodeClimate Engine for Salesforce.com Apex" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>Default ruleset used by the Code Climate Engine for Salesforce.com Apex</description>
<exclude-pattern>.*/.sfdx/.*</exclude-pattern>
<!-- COMPLEXITY -->
<rule ref="category/apex/design.xml/ExcessiveClassLength" message="Avoid really long classes (lines of code)">
<priority>3</priority>
<properties>
<property name="minimum" value="1000" />
</properties>
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
#
package.xml
# LWC configuration files
**/jsconfig.json
**/.eslintrc.json
@agentgill
agentgill / parseRESTResponseExample.js
Last active November 21, 2019 14:59
Parsing complex json salesforce responses from rest to csv
/*
@description How to parse Salesforce REST Responses
sfdx force:data:soql:query -q "SELECT Id, Subject, WhatId, Owner.Name,Type, CaseOwnerTeam__c, Case__r.Contact.Email, Case__r.Contact.State__c \
FROM Task \
WHERE \
Case__c != null AND Subject like '%legal%' and Type = 'Call' AND Case__r.ClosedDate != TODAY" -r json > input.json
*/