function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Where to access a user's Start of Day/End of Day

When booking an event in Apex I want to be able to check a user's availability. Currently we make users schedule non-working time as recurring events, but this is very clunky and they can only schedule x events in the future.


What I'd like to do is access the same Start of Day/End of Day values from the User's Personal Information that controls the display of the calendar, but these fields are not jumping out from the User object. Anyone have a clue where to find them ?



Best Answer chosen by Admin (Salesforce Developers) 

I found this possible solution from an earlier forum post:


"They say the fields aren't directly accessible from the API (duh) but that if you create a Formula Field and populate it with the value of the Start and End times, you can then access the Formula Field via the API. "