+ Start a Discussion

Resource and Public Calendar Events

I want to create resource and public calendar events using Apex. The problem I have ran into is inorder to create an event with Apex and then associate with a resource or public calendar requires the id of of the calendar object which would then be used to populate the ownerid field of the event object. It appears resource and public calendars are defined as users in the user table.
These user table records associated with resource and public though are "hidden" though. It does not seem possible to issue queries for them directly to the user table. Does anyone know a means of making the public and resource calendar users accessible in the user table?
Another question is whether it is possible to expose as an entries in a user lookup (reference) field? The calendar entries do not show up by default.
Any assistance is greatly appreciated!

I concur. 

Hard-coding the calendar ID means a new version of the trigger for every sandbox refresh, and the workaround (storing the calender ID in the default value of some read-only field) is both stupid and cumbersome.