Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACTAppointmentObject.DeletedDates: how to differentiate from Erased and Individual mods?

Astute Commentator
Posts: 168
Country: United States

ACTAppointmentObject.DeletedDates: how to differentiate from Erased and Individual mods?

Hi Everybody,

 

Here I am again. I am going through the ACTAppointmentObject.DeletedDates object for recurring appointments and it appears that individual recurring items that have been modified AND erased appointments are all flagged in this object. So if I have 1 Erased item and 2 modified items, all three appear as DeletedDates items. My question is:

  - How does one distinguish betwen the modified and the erased items in the DeletedDates Object?

  - If the DeletedDates is not the correct object to use, which objects should be used to

     1- Find out the erased items in a recurring event

     2- Find out the Modified items in a recuring event.

 

I've checked the properties in the DeletedDates object between Erased and Modified object but they seem to be identical. What am I missing?

 

T

 

Employee
Posts: 1,163
Country: USA

Re: ACTAppointmentObject.DeletedDates: how to differentiate from Erased and Individual mods?

First, just so we're clear I wasn't able to find an ACTAppointmentObject, however the DeletedDate property does exist for the Activity class so this is what I tested against. This was also done in the most recent beta build.

 

I created a new database with a single contact and a recurring activity with a reccurence pattern of weekly. I cleared the first occurrence, edited the second and deleted the third.

 

The first thing I noticed was that the FirstOccurrence, even though it was untouched returned values for DeletedDates, I'm not sure if this is the expected behavior, I'll have to inquire about this. 

 

While debugging I was able to see the following information in the DeletedDates Property for the cleared occurrence.

+[0]{7/19/2011 12:00:00 AM}System.DateTime+[1]{7/26/2011 12:00:00 AM}System.DateTime

Additionally, the ClearedDates returned the following information:

+[0]{7/12/2011 12:00:00 AM}System.DateTime

 

The edited activity returned an empty collection for DeletedDates, but the EditDate property was correct:

+EditDate{7/5/2011 9:49:03 AM}System.DateTime

 

Finally, our deleted activity wasn't returned at all via GetActivitiesForContact.

 

To answer your questions more directly, an edited activity should return an empty collection for the DeletedDates property, where a cleared one will not. An erased item (if it's included in the list of activities) will have the IsErased flag marked as True, an activity that's part of an activity series that's been edited will no longer be a part of the series and it's IsRecurringEvent will be marked as false.

Matthew Wood
Act! SDK Support
Community Moderator
Astute Commentator
Posts: 168
Country: United States

Re: ACTAppointmentObject.DeletedDates: how to differentiate from Erased and Individual mods?

Matt,

 

Thanx. I just got back from the 4th of July weekend and will start working on this tomorrow.

 

I'm trying to decipher the recurring events in ACT! and while setting up a test environment i.e. 3 contacts, 1 user, 1 reccuring event with modified, cleared, and erased items, all hell breaks loose i.e.: all the pointers withing the recurring events structure either get corrupted, orphaned, or just weird. AND I am doing this on just 1 recurring event. I am looking at this further this week.

 

T

Astute Commentator
Posts: 168
Country: United States

Re: ACTAppointmentObject.DeletedDates: how to differentiate from Erased and Individual mods?

Matt,

 

I worked a little bit more on this and I've created a video for you:

   http://www.youtube.com/watch?v=5ygXk8VSw9Y

 

This video describes what happens when a recurring activity is cleared and the corruption of the activity series. The scheduling was done on a 1-user database. Pretty simple stuff with some pretty potent repercussions. Check it out and then I'd like to know the development teams take on this.

 

Usually (and logically), the FirstOccurence activity should be like a "master" activity. In ACT! it keeps track of Cleared items as well as Erased items. However, it works ok if you only modify and/or erase items in the activities series. But  once you clear an item, the series get's intrinsically corrupt because none of the lists make sense and the DeletedDates list also includes the modified individual items in the series.

 

This is pretty major and can be duplicated on ACT! 2012.

 

T