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
User Event Type Constant | User Event Type Value | Entry Point | Handler Method Name | |
---|---|---|---|---|
CREATE | create | beforeSubmit() | createBeforeSubmit() | |
EDIT | edit | beforeSubmit() | editBeforeSubmit() | |
XEDIT | xedit | afterSubmit() | xeditAfterSubmit() |
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
var sheets = document.styleSheets; | |
var neatSheet = null; | |
/* Find the default style to edit */ | |
for (i = 0; i < sheets.length; i++) { | |
if (sheets[i].title === null) { | |
neatSheet = sheets[i]; | |
} | |
} |
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
# https://blog.softhints.com/how-to-merge-multiple-csv-files-with-python/ | |
# https://www.techbeamers.com/pandas-merge-csv-files/ | |
import os, glob | |
import pandas as pdlib | |
path = "/Users/mchang/Desktop/Salesforce/Account/1598097614646/" | |
list_of_files = glob.glob(os.path.join(path, "data_*.csv")) | |
# Consolidate all CSV files into one object | |
result_obj = pdlib.concat([pdlib.read_csv(file) for file in list_of_files]) |
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 csv | |
import os | |
import xml.etree.ElementTree as ET | |
FIELDS_SUBDIR = 'fields' | |
METADATA_NAMESPACE = 'http://soap.sforce.com/2006/04/metadata' | |
OBJECTS_DIR = 'force-app/main/default/objects' | |
namespaces = { | |
'': METADATA_NAMESPACE |
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
// You can reference the input variables using input.NAME | |
exports.step = function(input) { | |
return _.map(input.rows, function(row) { | |
// Please note that the format of this object is different | |
// from the format for the "Batch update records" operation. | |
return [ | |
{ | |
"key": "Role__c", | |
"value": row.role |
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 class SobjectQueryGenerator { | |
private List<Schema.DescribeFieldResult> fieldDescList; | |
private Schema.DescribeSObjectResult sobjectDesc; | |
public SobjectQueryGenerator(Schema.DescribeSObjectResult sobjectDesc, Boolean includeCalculated) { | |
this.sobjectDesc = sobjectDesc; | |
this.fieldDescList = new List<Schema.DescribeFieldResult>(); | |
for (Schema.SObjectField eachField : this.sobjectDesc.fields.getMap().values()) { | |
Schema.DescribeFieldResult eachDfr = eachField.getDescribe(); |
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
# Git shell | |
# https://gist.github.com/trey/2722934 | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_PS1_SHOWCOLORHINTS=true | |
export PS1='\[\033[0;36m\]\u@\h\[\033[0;35m\]:\[\033[0;33m\]\w\[\033[0;37m\]$(__git_ps1)\[\033[0m\]\n\$ ' |
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
// README: This is the only line you need to edit (generally speaking) | |
// This is the object for which I want to extract the field describes. | |
// Running this script will send the resulting field list to your user's email, | |
// with the fields as an attached CSV file. | |
Schema.DescribeSObjectResult objectDescribe = Schema.SObjectType.OpportunityLineItem; | |
/** | |
* Wrapper class to return CSV rows | |
*/ | |
public class FieldCsvWriter { |
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
# Check to require a username to be [given as argument][1] | |
# | |
# [1]: https://stackoverflow.com/questions/6482377/check-existence-of-input-argument-in-a-bash-shell-script | |
if [ -z "$1" ]; then | |
echo ERROR: Username argument required! | |
# [terminate and indicate error][3] | |
# | |
# [3]: https://stackoverflow.com/questions/4381618/exit-a-script-on-error | |
exit 1 |
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
# MavensMate | |
config/ | |
# Sublime Text | |
*.sublime* |
NewerOlder