Skip to content

Instantly share code, notes, and snippets.

@tet3
tet3 / findJSHyperlinkFields.apex
Last active September 17, 2017 18:39
Improved version of script to find any HYPERLINK fields with Javascript - debugs a result when no offending fields found. From https://help.salesforce.com/articleView?id=Using-Apex-Code-in-Workbench-to-Find-JavaScript&language=en_US&type=1
// Get all the standard and custom objects in the org
List<EntityDefinition> entityDefs = [select QualifiedApiName from EntityDefinition];
// Forming a list of Entity API names
List<String> entityNames = new List<String>();
for(EntityDefinition entityDef: entityDefs){
if(!entityDef.QualifiedApiName.endsWith('kav')){
@abeyer
abeyer / PBClearMultiPicklist.apxc
Created August 24, 2016 21:22
Set or clear multiselect picklist values from process builder
public class PBClearMultiPicklist {
public class Params {
@InvocableVariable(label='Object ID' required=true)
public String sobjectId;
@InvocableVariable(label='Picklist Field API Name' required=true)
public String fieldName;
@InvocableVariable(label='Value' required=true)
public String value;
@scottbcovert
scottbcovert / !Queueable Apex
Last active January 20, 2019 16:16
Gist of Centralized Async Handling via Queueable Apex; for accompanying presentation see http://scottbcovert.github.io/queueable-apex NOTE: The following source alone will not compile as it is one piece of a larger Force.com development framework available at https://github.com/scottbcovert/Centralized-Salesforce-Dev-Framework
Gist of Centralized Async Handling via Queueable Apex
For accompanying presentation see http://scottbcovert.github.io/queueable-apex
NOTE: The following source alone will not compile as it is one piece of a larger Force.com development framework available at https://github.com/scottbcovert/Centralized-Salesforce-Dev-Framework
@timstallmann
timstallmann / fix-permissions.sh
Created November 16, 2015 20:40
updated fix-permissions script
#!/bin/bash
# Help menu
print_help() {
cat <<-HELP
This script is used to fix permissions of a Drupal installation
you need to provide the following arguments:
1) Path to your Drupal installation.
2) Username of the user that you want to give files/directories ownership.
@greenstork
greenstork / Feedback Widget
Last active August 29, 2015 14:10
Visualforce/JS Feedback widget
<div id="feedback">
<div id="feedback-widget" style="z-index:300;display:none;">
<a class="handle" style="border-left:1px solid #ddd;border-top:1px solid #ddd;border-bottom:1px solid #ddd;" href="#">Feedback</a>
<div id="feedback-frame" style="display:none;">
</div>
</div>
</div>