Skip to content

Instantly share code, notes, and snippets.

@conrjac
Created October 19, 2016 19:34
Show Gist options
  • Save conrjac/d32c742105c297501c7c9b9ad51d034e to your computer and use it in GitHub Desktop.
Save conrjac/d32c742105c297501c7c9b9ad51d034e to your computer and use it in GitHub Desktop.
SalesForce Insert Holidays
List<Holiday> holidays = new List<Holiday>{new Holiday(Name = 'Good Friday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,03,25)),
new Holiday(Name = 'Easter Monday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,03,28) ),
new Holiday(Name = 'Early May Bank Holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,05,02) ),
new Holiday(Name = 'Spring bank holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,05,30) ),
new Holiday(Name = 'Summer bank holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,08,29) ),
new Holiday(Name = 'Boxing Day', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,12,26) ),
new Holiday(Name = 'Christmas Day (substitute day)', IsAllDay = TRUE, ActivityDate = Date.newInstance(2016,12,27) ),
new Holiday(Name = 'New Year’s Day (substitute day)', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,01,02) ),
new Holiday(Name = 'Good Friday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,04,14) ),
new Holiday(Name = 'Easter Monday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,04,17) ),
new Holiday(Name = 'Early May bank holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,05,01) ),
new Holiday(Name = 'Spring bank holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,05,29) ),
new Holiday(Name = 'Summer bank holiday', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,08,28) ),
new Holiday(Name = 'Christmas Day', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,12,25) ),
new Holiday(Name = 'Boxing Day', IsAllDay = TRUE, ActivityDate = Date.newInstance(2017,12,26))};
Insert holidays;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment