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
| 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
| <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
| 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
| 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 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 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 static HttpResponse makeHttpCallout(String url, String method, String body, Map<String,String> headers){ | |
| HttpRequest request = new HttpRequest(); | |
| Http http = new Http(); | |
| if(method == 'PATCH'){ | |
| request.setMethod('POST'); | |
| url += '?_HttpMethod=PATCH'; | |
| } else { | |
| request.setMethod(method); |
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
| /** | |
| * @description: Using Docomotion: create PDF via Process Builder using Form Name. Rather than using Form IDs which are different in each Org | |
| * @documentation: https://www.docomotion.com/support/generating-documents/silent-mode-generating-output-through-an-api/?highlight=API | |
| **/ | |
| public class GeneratePDFAction { | |
| @InvocableMethod( | |
| label='Custom Generate PDF' | |
| description = 'Generate PDF using a Form Name and What Id' | |
| ) |