This file contains hidden or 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 SystemDebugAction { | |
| @InvocableMethod( | |
| label='System Debug' | |
| ) | |
| public static void logDebugMessages(List<Request> requests) { | |
| for(Request request : requests){ | |
| logDebugMessage(request); | |
| } |
This file contains hidden or 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 StringUtils { | |
| public static String format(String format, String param1){ | |
| return String.format(format, new String[] {param1}); | |
| } | |
| public static String format(String format, Object param1){ | |
| return String.format(format, new String[] {String.valueOf(param1)}); | |
| } | |
This file contains hidden or 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 ExportSObjectAsCSV { | |
| // update with lowercase object names that you want to export as CSV files | |
| private static Set<String> sObjectsToExport = new Set<String> {'account', 'appointment__c', 'triages__c'}; | |
| public static void Execute() { | |
| System.debug('Starting: ExportSObjectAsCSV'); | |
| System.debug('SObjects to Export As CSV:'); |
This file contains hidden or 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 String getSObjectTypeById(Id recordId) { | |
| return recordId.getSobjectType().getDescribe().getName(); | |
| } |
This file contains hidden or 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
| <article class="slds-card"> | |
| <div class="slds-card__header slds-grid"> | |
| <header class="slds-media slds-media_center slds-has-flexi-truncate"> | |
| <div class="slds-media__figure"> | |
| <lightning:icon iconName="standard:opportunity" alternativeText="TITLE" /> | |
| </div> | |
| <div class="slds-media__body"> | |
| <h2 class="slds-card__header-title"> | |
| <a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="TITLE"> |
This file contains hidden or 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<AggregateResult> results = [SELECT Count(ID), PersonEmail | |
| FROM Account | |
| WHERE IsPersonAccount = TRUE | |
| GROUP BY PersonEmail | |
| HAVING Count(ID) > 1 | |
| ORDER BY Count(ID) DESC | |
| LIMIT 2000]; | |
| String report = 'count,PersonEmail\n'; |
This file contains hidden or 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 without sharing class CustomLog { | |
| private static StringBuffer buffer; | |
| static { | |
| buffer = new StringBuffer(); | |
| } | |
| public static void append(String value) { | |
| buffer.append(value + '\n'); |
This file contains hidden or 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 without sharing class DatetimeUtils { | |
| public static String getDayOfMonthSuffix(Integer n) { | |
| if (n == null) { | |
| return ''; | |
| } | |
| if (n >= 11 && n <= 13) { | |
| return 'th'; |
This file contains hidden or 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
| Schema.DescribeFieldResult dfr = Opportunity.StageName.getDescribe(); | |
| List<Schema.PicklistEntry> picklistValues = dfr.getPicklistValues(); | |
| String output = ''; | |
| for(Schema.PicklistEntry entry : picklistValues) { | |
| if (output != '') { | |
| output += ','; | |
| } |