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 jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
var outputString = ''; | |
function getAPISafeLabel(name){ | |
name = name.replace(/\ /g,'_'); | |
name = name.replace(/\//g,'_'); | |
name = name.replace(/\,/g,'_'); |
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
MetadataService.MetadataPort service = new MetadataService.MetadataPort(); | |
service.SessionHeader = new MetadataService.SessionHeader_element(); | |
service.SessionHeader.sessionId = UserInfo.getSessionId(); | |
MetadataService.Layout layout = (MetadataService.Layout) service.readMetadata('Layout', new String[] { 'Account-Account Layout' }).getRecords()[0]; | |
system.debug(JSON.serializePretty(layout.layoutSections[0].layoutColumns[0].layoutItems[0].field)); | |
List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>(); | |
MetadataService.ListMetadataQuery queryListView = new MetadataService.ListMetadataQuery(); | |
queryListView.type_x = 'ListView'; |
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 xmltodict | |
OBJECT_NAME = 'Case_Backup.object' | |
PICKLIST_FIELD = 'Team__c' | |
def parseRecordTypes(): | |
for recordType in getRecordTypes(): | |
parseRecordType(recordType) | |
def parseRecordType(recordType): |
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 jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
function main(){ | |
var formulaFieldCells = $("td:contains('Formula (')"); | |
var fieldList = []; | |
formulaFieldCells.each(function(){ | |
formulaField = $($(this).prev()[0]).html(); |
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
List<Case> c = [SELECT Id, isDeleted FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //1 | |
//Formula field | |
c = [SELECT Id, Created_During_Business_Hours__c FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //0 | |
//Created_During_Business_Hours__c uses this field in formula | |
c = [SELECT Id, Actual_Case_Start_Time__c FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //0 |
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
// must be in edit page of particular profile | |
// e.g., https://cs15.salesforce.com/00ee0000000Lw5d/e?s=ObjectsAndTabs&o=Account | |
// will add read to every field. | |
// doesnt change edit permissions | |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
function main(){ |
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
#!/usr/bin/python | |
import xmltodict | |
import glob | |
def getProfiles(): | |
profiles = glob.glob('profiles/*.profile') | |
rows = getCSVShell(profiles[0]) | |
for profile in profiles: | |
addColumns(profile, rows) |
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 jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
var outputString = ''; | |
function getCategory(){ | |
categories = document.getElementById('00NC0000004yBn3').options; | |
j$(categories).each(function(){ | |
if (j$(this).val() !== ''){ |