Community
Showing results for 
Search instead for 
Do you mean 
Reply

Retrieving Calendar Events

Copper Contributor
Posts: 31
Country: USA

Retrieving Calendar Events

Hello,

 

I'm trying to retrieve calendar events through the ACT! SDK. For example, I just set up a testing event for today through the Schedule -> Manage -> Events screen. I now have this event showing at the top of my calendar view for today. I expected that this would be visible like normal activities, but I do not see it. I have some code like:

 

ActivityFieldDescriptor afdOccurDate = new ActivityFieldDescriptor(ActivityField.OccurDate);

ActivitySortCriteria aSort = new ActivitySortCriteria(afdOccurDate, ListSortDirection.Ascending);

 

 ActivityDateFilterCriteria adfcDateRange = new ActivityDateFilterCriteria(afdOccurDate, dStart, dEnd);

alCriteria.Add(adfcDateRange);

 

 IActivityFilterCriteria[] afcFilter =

(IActivityFilterCriteria[])alCriteria.ToArray(typeof(IActivityFilterCriteria));

 

// Get the activities.

 ActivityList aList = ActFwk.Activities.GetTaskListItems(

aSort, afcFilter, dStart, dEnd,

FirstInstanceRestriction.None, false);

 

With this, aList contains all the activities I expect for the date range I use, but the events do not show up. Is there another way that I should be accessing these?

 

Thanks,

 

- Rob

Bronze Super Contributor
Posts: 1,170
Country: USA

Re: Retrieving Calendar Events

Being that an event has a different interface in the GUI and has differing structure, I would guess that your issue is because events are not an activity...
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Retrieving Calendar Events

'---------------------------------------------------------------------------------------------------------------------------------

 ' Get SCHEDULED EVENTS from under the SCHEDULE MENU in ACT

'---------------------------------------------------------------------------------------------------------------------------------

Dim myGlobalEvents As ActivityList = Me.HostApplication.ActFramework.Activities.GetGlobalEvents()

 

 

-- Jim Durkin