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).
When in doubt ask Derek as he is 100% correct this is the TOP problem with custom data provider and is being caused by your data result set not setting the correct KEY for not only the appointment but for the variance as well... the easiest way to fix this problem is to step into your code and look at the key being assigned (if any) and verify that it is linked correctly to the appointment etc.
I think I found the reason why FetchVariances was never called. It would be nice if someone from Infragistics could confirm/explain this.
Derek mentioned above that we need to ensure the appointment doesn't have an empty variance key. There wasn't a property on the Appointment/Activity class to set a variance key, or so I thought. I dug through the Infragistics code to see what actually calls FetchVariances, and it is looking for a VarianceKey != Guid.Empty.
The problem is that the Activity class has a public property that isn't displayed in Intellisense. So I had no idea I could even set this property. The problem code is below (I think). After setting the (hidden) variance key the method is fired properly. Thoughts? Is it likely that there are other public properties hidden like this one?
[EditorBrowsable( EditorBrowsableState.Never)] [Browsable( false)] public Guid VarianceKey
{
...
I have a very similar problem, and have confirmed certain aspects of what was recommended above. I have done the following:1) On FetchActivities I can confirm that the RecurrenceKey is populated.
2) FetchRecurrences is called, which is great. I grabbed the recurrence list, created the recurrences and added them to the FetchRecurrenceContext's Recurrences collection. I also verified that I'm populating a recurrence with the same key as one of the appointments in step 1. All is well.
3) This is where I'd expect the FetchVariances operation to be triggered. Is that correct? If so, I never see it.
4) The next step that fires for me is FetchReminders. At this point I can see the WebScheduleInfo's Activities collection. I went back to the appointment verified in #1. It has a recurrence object populated, which to me tells me the two are linked.
Can you think of anything else I can do to track this down? Derek - for #2 on your suggestion, wouldn't a blank variance key only pertain once you're able to call FetchVariances? When fetching activities there is no VarianceKey to set - right? I may be missing something there...
Hi Guys,
I have same kind of problem for variance. I am unable to locate custom variance setting for recurrance. Pls give me code to set custom variance where can i fire FetchVarinacesContext event.
Thanks in advance