View ClassExercises5.cls
public with sharing class WeekFiveClassExercises { | |
public static void allAboutSets() { | |
//Let's make a set | |
Set<String> cuisineTypes = new Set<String>(); | |
//Why a set instead of a list? Usually because we need each entry in the collection to be unique. | |
//Perhaps we're creating a list of cuisines and it's possible we'll encounter the same one twice, but we don't want it to appear twice |
View gist:5de5713b168ae0b30a0459e0b5f29d42
/** | |
* ContactTriggerHandler description | |
* @description this class is responbile for... | |
* @author Kevin Poorman | |
* @updated 8/26/19 | |
*/ | |
public with sharing class CommentingOnCodeExercise { | |
/** |
View ESlomskiWeekFiveHomework.cls
public with sharing class WeekFiveHomework { | |
public static void setsReview(){ | |
//Your assignment: Play with Sets! | |
// 1. Create a set of Strings and add at least 5 entries | |
Set<String> Colors = new Set<String>(); | |
Colors.add('Pink'); |
View week4homework-redux.cls
public with sharing class WeekFourHomework { | |
//Let's practice calling different methods by writing our very own methods. You will write and save methods in the space below | |
//that call the existing methods you see already written here. Ready? Let's Go! | |
//Sample: Here is a public method that calls the getfavoriteColorsMethod below and prints the results to our debug log | |
public static void printOutFavoriteColorsDemo() { | |
List<String> favoriteColors = getFavoriteColors(); | |
System.debug('Here are the favorite colors: ' + favoriteColors); |
View Demo_PromiseUse.cls
/** | |
* Promise v2.0 - Kevin Poorman | |
* Thanks to Chuck Jonas! | |
* This class exists to demonstrate the usage of the Promise library. | |
* | |
*/ | |
Public Class Demo_PromiseUse { | |
// This execute method optionally accepts a string param that is used to pass data into | |
// the intial promise step. | |
Public Void execute(String param) { |
View Log.cls
/** | |
* Created by kpoorman on 3/25/17. | |
* Log provides standardized methods for logging data to | |
* debug logs in a structured, easy to find way. | |
* All methods are static by design. This should be 0 setup | |
* or at least 0 in code setup. | |
* | |
* Future versions may pull configuration from | |
* custom metadata #safeHarbor | |
*/ |
View ExampleCode.cls
public with sharing class ExampleCode { | |
public class exampleCodeException extends Exception {} | |
Public Integer add(Integer one, Integer two){ | |
return one + two; | |
} | |
Public Decimal divide(Integer one, Integer two){ | |
if(two == 0){ | |
throw new exampleCodeException('Dividing by Zero makes Astro Cry'); |
View Invocable_TriggerMCEvent.cls
public with sharing class Invocable_TriggerMCEvent { | |
@InvocableMethod(label='Send Message with new Comment to Reporter' description='Send Message with new Comment to Reporter') | |
public static void TriggerMCEvent(List<String> contactKey) { | |
MCMessagingUtils.triggerMCInteractionEvent(contactKey[0]); | |
} | |
} |
View DestroyAllTheThings.cls
public class DestroyAllTheThings { | |
public DestroyAllTheThings() {} | |
public void destroySimpleCRMStuff() { | |
//First clear out known dependents, leads and cases etc. |
View Error.txt
Line 6: Cannot invoke 'MKCircle.Type.init' with an argument list of type '(centerCoordinate: CLLocationCoordinate2D, radius:CLLocationDistance) |