简体   繁体   中英

SOQL to get list of Holidays associated with the business hours

I am looking to get the list of Holidays associated with the business hours in salesforce. But I dont see a way to get association between these two.

Even if I query on both the object, I dont see any relationship, please guide.

SELECT 
ActivityDate,Description,EndTimeInMinutes,Id,IsAllDay,IsRecurrence,Name,Recurrence
Type,StartTimeInMinutes,SystemModstamp FROM Holiday

Please check the below docs:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_businesshourssettings.htm

BusinessHoursSettings :

Represents the metadata used to manage settings for business hours and holidays in entitlements, entitlement templates, campaigns, and cases. This type extends the Metadata metadata type and inherits its fullName field. In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.

BusinessHoursEntry :

Represents the application of business hours to entitlements, entitlement templates, campaigns, and cases.

Holidays :

Represents a holiday and its usage in businessHours.

Take special notice of the below:

businessHours string - The name of the business hours setting that applies to this holiday.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM