+ Start a Discussion

Querying public Calendars

    Is there a way to query the public calendars in organization,using sforce  API call?

Message Edited by Sham on 09-27-2007 04:15 AM

Hello Sham,

You should be able to use the following code to pull the Id of the event and the Owner ID.  By putting the ID of your calendar in replace of mine, it should pull the records.

Select e.OwnerId, e.Id From Event e WHERE e.OwnerId = '02370000000Cw8Z'

Thanks TCAdmin.

This does pull the records for a particular calendar.

But i would like to show the user a list of all avaliable public calendars in my scontrol from which he should be able pick one .


What you may want to do is utilize the Custom Link section at the left of the page or an HTML area.  This allows you to put a link to each of the public calendars and would allow your users to quickly choose the one they want.

<A href="/ui/core/calendar/CalendarPage—cal_lkid=02330000000CKfa">Media Room</A>




 it works.