Skip to content

Instantly share code, notes, and snippets.

View jongpie's full-sized avatar
☁️

Jonathan Gillespie jongpie

☁️
View GitHub Profile
@jongpie
jongpie / CustomPermissionsReader.cls
Created February 24, 2017 09:30 — forked from afawcett/CustomPermissionsReader.cls
CustomPermissionsReader
/**
* Copyright (c), Andrew Fawcett
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
@jongpie
jongpie / FieldNamesScript.cls
Last active September 21, 2022 02:49 — forked from Feldstrom/LayoutDescriber.cls
Apex script for pulling field names from specific page layouts
public String objectName = ''; //example 'Case'
public String layoutName = ''; //example: 'Case Layout'
new LayoutDescriber().run(objectName, layoutName);
// In anonymous Apex, you can define & run a class.
// In this script, using a class ensures all describe methods work, regardless of field-level security (FLS)
public without sharing class LayoutDescriber {
public void run(String objectName, String layoutName) {
layoutName = objectName + '-' + layoutName;