As far as I understand, the junction object is hidden by Salesforce itself. I found an answer that advises to link objects by their names: BH : USA; Holiday : USA - New Year

But in this case we will select Holidays that have no connection with BusinessHours

BusinessHours.isWithin is not suitable, as it returns false if targetDate falls on a weekend day (Or any other non-business hour). I need to know exactly if the day is a holiday for a particular user associated with BusinessHours

1 Answer 1


Based on the document seems it's Many to one kind of relationship is available in Business Hours and it's associated Holiday. The document clearly described this as followingly,

  • You can associate up to 1000 holidays with each set of business hours.

  • Holidays automatically acquire the time zone of the business hours with which they are associated. For example if you associate a holiday to business hours that are in Pacific Standard Time, the holiday will take effect for those business hours in Pacific Standard Time

  • You can only add business hours marked as Active to holidays.

So answer your question, Yes. Holiday is providing the details like which date is Holiday for the user and Business hours is defined the Holiday applicable hours details like FROM and To in that particular Holiday for that user.

Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .