You need to sign in to do that
Don't have an account?
Giancarlo Amati
BusinessHoursUtilities.BusinessHoursHelper bhHelper returned null
Dear Team,
we've found the following code of a Case Trigger which emits an error message related to the case owner time zone. I checked the users' time zone both in the SFDC Admin --> Users and also in every single profile in the "My Settings" section. They all have a timezone assigned but for some reason, I believe the bcHelper variable is always NULL and so it triggers the error message.
Where else should I be looking at?
Thank you.
GC
Cannot match case owner's time-zone to a business hour/holiday record; please update case owner's time-zone in the user profile
BusinessHoursUtilities.BusinessHoursHelper bhHelper = mapBusinessHoursHelpersByUserId.get(c.OwnerId); if (bhHelper == null) { c.addError('Cannot match case owner\'s time-zone to a business hour/holiday record; please update case owner\'s time-zone in the user profile.'); }
this is what a grabbed from the long:
1. for a user with time zone set in IST (India) I get:
For a case owner based in GMT or EST I get the following:
I don't think it's a matter of coding but why the BusinessHoursUtilities is behaving like this. It looks that to the first Case OwnerID doesn't have business hours or Time zone linked.
Thank you.
GC