No such column BusinessHours on entity Case Exception in Salesforce

No such column BusinessHours on entity Case Exception in Salesforce

No such column ‘BusinessHours’ on entity ‘Case’ Exception in Salesforce is thrown since BusinessHours is not a column or field in Case Entity. Instead use BusinessHoursId or BusinessHours.Name.

As per the Case object definition(https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_case.htm), the API Name is BusinessHoursId. So, do not use BusinessHours as the column or field name in the SOQL.

Sample SOQL:

SELECT Id, BusinessHours.Name
FROM Case
WHERE Id = '5005e00000GT9Gi'

Leave a Reply