Can anyone please help me out on this one?
Can anyone please help me out on this one?
If you want to get the ID manually, you can navigate to each calendar, go to Manage > Manage Calendar > Calendar Options and select "Show Identifiers" at the bottom of the panel.
Actually, I want it from the group. Not manunally.
A group can have multiple calendars which will each have their own IDs. To list calendars in a group, use the Calendar List REST endpoint ( https://community.telligent.com/community/11/w/api-documentation/64549/list-calendar-rest-endpoint ) or the Script API $calendar_v1_calendars.List API ( https://community.telligent.com/community/11/w/api-documentation/65675/calendar_5f00_v1_5f00_calendars-script-api#List ) with CalendarContext="Group" and CalendarReferenceId="GROUP_ID"
Both CalendarContext=group and CalendarReferenceId=group_id are not working to get the calendars of the particular "group".
CalendarContext is case sensitive. Here's an example, written in Velocity, that shows up to 10 calendars in the current contextual group:
<ul> #foreach($calendar in $calendar_v1_calendars.List("%{PageSize=10,PageIndex=0,CalendarContext='Group',CalendarReferenceId=$core_v2_group.Current.Id}")) #each <li>$calendar.Id</li> #nodata <li>No calendars exist in the current group.</li> #end </ul>
CalendarContext is case sensitive. Here's an example, written in Velocity, that shows up to 10 calendars in the current contextual group:
<ul> #foreach($calendar in $calendar_v1_calendars.List("%{PageSize=10,PageIndex=0,CalendarContext='Group',CalendarReferenceId=$core_v2_group.Current.Id}")) #each <li>$calendar.Id</li> #nodata <li>No calendars exist in the current group.</li> #end </ul>
Yeah Got it! Thanks @Ben
And this will be the code if the group has subgroups.
#set($groupVar = $core_v2_group.Current) #set ( $subgroupVar = $core_v2_group.List("%{ IncludeAllSubGroups = 'true',ParentGroupId = $groupVar.Id }") ) #foreach($calendar in $calendar_v1_calendars.List("%{PageSize=50,CalendarContext='Group',CalendarReferenceId=$subgroupVar.Id}") #each <li>$calendar.Id</li> #nodata <li>No calendars exist in the current group.</li> #end