I've spent the last week trying to tackle reading and writing to Recurring Activities with C#. So far, I've figured out how to read the activities and their RecurrencePattern. By returning the Sage.PlatformActivity.Activity object (instead of IActivity object), there are some properties that present this pattern in a very friendly way.
However, it's not as straight forward for creating (or editing) recurring activities. If I edit a sample (weekly) recurring activity and change the days of the week to Friday, the activity recurring pattern sets to 1. The client doesn't know how to handle this as it's not correct and won't show the activity.
Here is some sample code that I'm using to make this change to the recurring pattern:
Sage.SalesLogix.Activity.Activity cal = Sage.SalesLogix.Activity.Activity.GetActivityFromID("V6UJ9A0004H6");
cal.RecurrencePattern.RecurrenceType = Sage.SalesLogix.Activity.RecurrenceType.rtWeekly;
cal.RecurrencePattern.Pattern.Weekly.Days = Sage.SalesLogix.Activity.Day.dayFriday;
cal.RecurrencePattern.UpdateActivity(cal);
cal.Save();
My question is this, has anyone had success programatically creating recurring activities through back-end code? If so, can you share anything that can help get me in the right direction?
Thanks!
-Jeremy