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
public with sharing class ChatterUtils { | |
// makes a simple chatter text post to the specified user from the running user | |
public static void simpleTextPost(Id userId, String postText) { | |
ConnectApi.FeedType feedType = ConnectApi.FeedType.UserProfile; | |
ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput(); | |
messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>(); | |
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
/** | |
* Developed by Doug Ayers (douglascayers.com) | |
*/ | |
public with sharing class DuplicateRecordUtils { | |
public static Set<ID> getDuplicateRecordIds( ID recordId ) { | |
Set<ID> duplicateRecordIds = new Set<ID>(); | |
// Potential duplicate records are grouped together into 'duplicate record sets'. |
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
<apex:page standardController="Account" standardStylesheets="false" applyHtmlTag="false" showHeader="false" renderAs="PDF"> | |
<head> | |
<style type="text/CSS"> | |
body{ | |
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; | |
} | |
.center{ | |
text-align:center; |
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
/** | |
* Developed by Doug Ayers | |
* douglascayers.com | |
* | |
* Designed to be used by SendEmailInvocable class when sending | |
* several emails but need to stay within the apex governor limits | |
* of how many emails can be sent per transaction. Call this batchable | |
* with all the emails to send and set the batch size to max per transaction. | |
* https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm | |
* |
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
public class CaseOpenBizHoursBatchable implements Database.Batchable<SObject>, Database.Stateful { | |
private ID businessHoursId { get; set; } | |
public CaseOpenBizHoursBatchable( ID businessHoursId ) { | |
this.businessHoursId = businessHoursId; | |
} | |
public Database.QueryLocator start( Database.BatchableContext context ) { | |
// Idea behind this query is to get all open cases or |
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
public with sharing class InvocableApexTemplate { | |
@InvocableMethod( | |
label = 'Name as displayed in Process Builder' | |
description = 'Tooltip as displayed in Process Builder' | |
) | |
public static List<Response> execute( List<Request> requests ) { | |
List<Response> responses = new List<Response>(); | |