CalendarRule.GroupDesignator RRS feed

  • Question

  • CalendarRule (used for setting resource/Equipment calendars) has a GroupDesignator property which is apparently used to associate multiple calendar rules so that you can view/edit all the calendars as a cohesive weekly "vary by day" group. For example, when you create a weekly calendar through the CRM web GUI with different hours for each day and then examine the created calendars through the SOAP service (XRM), you see that each day gets a different CalendarRule, and within each CalendarRule is an inner calendar that has a rule with its GroupDesignator set to a string which looks like a GUID. If you zero this GUID out (set to null for each CalendarRule), then when you go back to the GUI you no longer get the option to edit the calendar as a cohesive week--you just jump straight to editing the specific day.

    Ergo, GroupDesignator is somehow used to associate CalendarRules together as weekly units. But it isn't enough to generate a fresh GUID and set a group of rules to that GUID--that still results in the calendars being treated individually. The help file and MSDN don't document how GroupDesignator is supposed to be used or set programmatically--does anyone have any sample code?

    My scenario is that I'm creating resource calendars programmatically in order to sync data from another system, and they need to come out as weekly calendars.

    Thanks in advance,
    Monday, July 21, 2014 5:05 PM