Hi,
Can anyone provide me a working exaple of custom data provider that provides features like varience and deleted instance of recurring activities.
Thanks,
Farrukh
Hi Farrukh -
FetchVariancesContext context.
Thanks
-Gweyn
Reasons why Fetch( FetchVarianceContext context ) isn't called:
1.) The root Appointment object and Recurrence object are not attached to each other by the RecurrenceKey property (i.e., the Appointment isn't recurring).2.) The root Appointment object has an Empty value for it's VarianceKey property (i.e., when it was written to the data source the emptiness of this key means it had no variances).
Check that the RecurrenceKey property on the root Appointment object isn't "-999" and that when creating the Recurrence object the CreateRecurrence( ) called was using the actual root Appointment object (and not a copy).
I'm able to fire Fetch( FetchVarianceContext context ), I have an 2 activity records, both have the same variance key, 1 has recurrence, 1 doesn't because i recieved an error if they both had the same recurrence key, and the object has Variance is true. But the variance doesn't show up on the calendar, the orginal recurence still does. Any Help?
I'm using a custom provider that i wrote, when I go through FetchActivities with the Root, and Variance having the same RecurenceKey, this is the error I get: "System.Exception: Recurrences must have only one recurring root appointment. This recurrence object already has a root appointment set, therefore attaching it to another root appointment is not permitted." My provider calls FetchActivities, loads all the activities, FetchRecurrences, loads the recurrences, Fetch Variances and loads the variances: Based on the context.Operation on the Fetch(DataContext context) method. I have been calling CreateVariance from the Base activity, because the Variance activity didnt have a RecurrKey and would throw an error if i tried to call create variance from a record with no RecurrKey.
So it sounds like I need to figure out why I can't have 2 activites with the same recurrenceKey, and that should solve my problem?
My first question would be around what error you're getting if the 2 activity records have the same recurrence key. My solution has the base activity with the same recurrence key as the variances. I think this is required too, because the VARIANCE_SEL procedure requires a recurrence key. It needs to know which series to get variances for.
After that, I would want to make sure you're calling CreateVariance off the base activity when you're populating the variance info.