Skip to content

Instantly share code, notes, and snippets.

View jamessimone's full-sized avatar

James Simone jamessimone

View GitHub Profile
@jamessimone
jamessimone / CaseStatus.standardValueSet
Created January 21, 2021 04:55
Example standardValuetSet file
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>CaseStatus</fullName>
<standardValue>
<fullName>In Progress</fullName>
<isActive>true</isActive>
</standardValue>
<standardValue>
<fullName>On Hold</fullName>
<isActive>true</isActive>
@jamessimone
jamessimone / CollectionUtils.cls
Last active April 8, 2024 09:27
Helper methods for working with collections in Apex
public class CollectionUtils {
public static List<Id> convertToIdList(List<SObject> sObjectList) {
return new List<Id>(convertToIdSet(sObjectList));
}
public static List<Id> convertToIdList(List<SObject> sObjectList, SObjectField field) {
return convertToIdList(sObjectList, string.valueOf(field));
}
public static List<Id> convertToIdList(List<SObject> sObjectList, string field) {