We are implementing Salesforce Scheduler and have encountered a serious issue with our automated deployments following the implementation of the Operating Hours Holidays functionality.

When these records are included in an org, any subsequent deployment that attempts to deploy the BusinessHours.settings metadata (which contains the Holiday definitions that are referenced by the Operating Hours Holidays records) fails with the following error:

delete failed for this entity

From my investigation, it appears that on deployment the platform is attempting to delete and recreate the Holiday records, but due to the references to these on the Operating Hours Holiday records the error is being thrown.

We have identified that a possible solution is to remove the BusinessHours.settings from our deployment entirely and make this a manual deployment step, but would like to understand:

  1. If anyone has encountered this issue before, and if so what they did to solve it
  2. If anyone has documentation on the deployment behaviour of the Holiday records (i.e. the deletion and recreation of those records)

Thanks in advance for your help!

1 Answer 1


I'm adding an answer to this to help anyone else that encounters this in the future.

The 'fix' for this that we have found is to remove the BusinessHours.settings from our metadata deployment and manage the creation and maintenance of any Business Hours manually within our environments. The Holiday records themselves can be created via DataLoader/Bulk API so we have moved the management of those to utilise that toolset. In doing this, the Name field works as an External Id which allows us to upsert Holidays without any interference from the linked Operating Hours Holiday records.

You must log in to answer this question.

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