Community
Showing results for 
Search instead for 
Do you mean 
Reply

batch calendar deletes

Tuned Listener
Posts: 5
Country: USA

batch calendar deletes

While testing a calendar sync application, I managed to create over 2000 duplicate To-Do's.  I need some batch method to delete these entries from my ACT! database.  I tried looking into the SDK as a way of writing an app to do this, but I can find no abilities in the SDK to access calendar entries.  Does anyone have any ideas how to do this with less than 5 clicks per entry to be deleted???

 

Thanks

 

Harold

 

Nickel Super Contributor
Posts: 441
Country: UK

Re: batch calendar deletes

There's some samples in the sdk, you would need to get each activity, check its details and delete as appropriate... example from the sdk...

Public Function GetActivityList( _ ByVal sortCriteria As ActivitySortCriteria, _ ByVal filterCriteria As IFilterCriteria, _ ByVal startRange As Date, _ ByVal endRange As Date, _ ) As ActivityList 'Example 1 Dim sortCriteria As ActivitySortCriteria Dim filterCriteria() As ActivityInFilterCriteria Dim startRange As Date Dim endRange As Date . . . aList = ActFwk.Activities.GetActivityList(sortCriteria, filterCriteria, startRange, endRange) 'Example 2 'This example populates an ActivityList with timeless activities 'then displays the number of records that were returned. 'Our ActivityList Dim aList As ActivityList 'Get the IsTimeless Activity Field Descriptor. Dim timeLess As ActivityFieldDescriptor = New ActivityFieldDescriptor(ActivityField.IsTimeless) 'Set the sort criteria. Dim occurDate As ActivityFieldDescriptor = New ActivityFieldDescriptor(ActivityField.OccurDate) Dim aSort As ActivitySortCriteria = New ActivitySortCriteria(occurDate, ListSortDirection.Ascending) 'Set the filter criteria. Dim aFilter() As ActivityInFilterCriteria = New ActivityInFilterCriteria() {New ActivityInFilterCriteria(timeLess, New Byte() {1})} 'Get the ActivityList filtered for TimeLess activities over the next seven days. aList = ActFwk.Activities.GetActivityList(aSort, aFilter, DateTime.Now, DateTime.Now.AddDays(7)) MessageBox.Show(aList.Count.ToString())

 

Tom