We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Linking appointment occurences with recurrence series in Schedule

When I want to edit an occurence of a recurring appointment, the occurence loses its link to the series. The occurence in the Schedule does not show the recurring-icon and I am unable to select "Edit Series".

My - simplified - schedule is set up like this:

@{Html.EJ().Schedule("Schedule")
                  
                  .Views(new List<string>() { "Day", "Week", "Workweek", "Month" })                          
                          .Orientation(Orientation.Horizontal)                          
                          .EnableLoadOnDemand(true)
                          .Group(gr =>{gr.Resources(Model.ScheduleGroupings);})
                          .Resources(res =>
                          {                             
                              res
                                 .Field("EmployeeId")
                                 .Title("Employee")
                                 .Name("Employees")
                                 .AllowMultiple(false)
                                 .ResourceSettings(fields => fields.Datasource(Model.EmployeeResources)
                                    .Text("Text")
                                    .Id("Id")
                                    .GroupId("GroupId")
                                    .Color("Color")).Add();

                               if (Model.ScheduleGroupings.Contains("EmployeeGroups"))
                              {
                                  res
                                     .Field("EmployeeGroupId")
                                     .Title("EmployeeGroup")
                                     .Name("EmployeeGroups")
                                     .AllowMultiple(false)
                                     .ResourceSettings(fields => fields.Datasource(Model.EmployeeGroupResources)
                                        .Text("Text")
                                        .Id("Id")
                                        .GroupId("GroupId")
                                        .Color("Color")).Add();
                              }

                          })
                          .AppointmentSettings(fields =>
                          {                              
                              fields.Datasource(dataSource => dataSource.URL("/Schedule/GetCaseTasks")
                              .EnableAjaxCache(false)
                              .Adaptor(AdaptorType.UrlAdaptor)
                              )
                                    .Id("Id")
                                    .Subject("Subject")
                                    .StartTime("StartTime")
                                    .EndTime("EndTime")
                                    .Description("Description")
                                    .AllDay("AllDay")
                                    .Recurrence("Recurrence")
                                    .RecurrenceRule("RecurrenceRule")
                                    .RecurrenceId("RecurrenceId")
                                    .RecurrenceExDate("RecurrenceExDate")        
                                    .ResourceFields(Model.ScheduleResourceFields);
                          })                          
                          .Render();
    }

My controller returns the following appointments:

[    
    {
        "Id": 323,
        "Subject": "Recur test",
        "Description": null,
        "StartTime": "/Date(1556766000000)/",
        "EndTime": "/Date(1556769600000)/",
        "Categorize": "",
        "EmployeeGroupId": "g2",
        "EmployeeId": "g2e7",
        "Priority": "",
        "AllDay": false,
        "Recurrence": true,
        "RecurrenceRule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=SU,MO,TU,WE;",
        "RecurrenceId": null,
        "RecurrenceExDate": "5/7/2019"
    },
    {
        "Id": 325,
        "Subject": "Recur test",
        "Description": null,
        "StartTime": "/Date(1557198000000)/",
        "EndTime": "/Date(1557201600000)/",
        "Categorize": "",
        "EmployeeGroupId": "g2",
        "EmployeeId": "g2e7",
        "Priority": "",
        "AllDay": false,
        "Recurrence": false,
        "RecurrenceRule": null,
        "RecurrenceId": 323,
        "RecurrenceExDate": null
    }
]

Reading through the Schedule-documentation on various platforms my understanding is, that the occurence should only use the RecurrenceId value, and have recurrence disabled. I would like help with this, so that once an occurence is created I can still edit the series through the occurence. Hope it makes sense.

5 Replies

VD Vinitha Devi Murugan Syncfusion Team May 15, 2019 08:47 AM

Hi Toke, 
 
Greetings from Syncfusion Support. 
 
We have checked the reported scenario by preparing sample but CRUD actions is working fine at our end. The same can be available in following link.  
 
 
Kindly check the above sample and if the issue persist still try to reproduce the issue in the above to proceed further.  
 
Regards, 
M.Vinitha devi. 



TW Toke Wivelsted May 15, 2019 02:02 PM

It seems that setting the RecurrenceId (highlighted below) through the MVC Schedule has no effect.
Instead, the RECUREDITID property MUST be set in the RecurrenceRule for the occurence to stay attached to their recurrence series.
The RecurrenceExDate works as I would expect: it holds the dates of the 'activated' and deleted occurences, and, the dates does not have to be included in the RecurrenceRule. I would think the RecurrenceId would work in the same way? 

The only place RecurrenceId is mentioned in the MVC documentation (that I have been able to find) is under data-binding where it states the following: Binds the recurrence Id field which acts as a parent id for Scheduler recurrence appointments.

Is this working as intended?

...
.AppointmentSettings(fields =>
{                              
     fields.Datasource(dataSource => 
          dataSource.URL("/Schedule/GetCaseTasks")
          .EnableAjaxCache(false)
          .Adaptor(AdaptorType.UrlAdaptor)
     )
      .Id("Id")
      .Subject("Subject")
      .StartTime("StartTime")
      .EndTime("EndTime")
      .Description("Description")
      .AllDay("AllDay")
      .Recurrence("Recurrence")
      .RecurrenceRule("RecurrenceRule")
      .RecurrenceId("RecurrenceId")
      .RecurrenceExDate("RecurrenceExDate")         
}
...


KK Karthigeyan Krishnamurthi Syncfusion Team May 16, 2019 05:55 AM

Hi Toke, 
 
Thanks for the update. 
 
In your initial post, the edited occurrence data ( "Id": 325) has no recurrence rule, therefore it acted as normal appointment. When any one of the occurrence is edited, then the parent appointment id is added to edited appointment rule (like red) and the parent appointment rule is updated with the edited appointment date (like yellow). 
 
 
RecurrenceId is deprecated as we updated the edited occurrence appointment rule with RECUREDITID. Kindly make use of our previous CRUD sample. 
 
Regards, 
Karthi 



TW Toke Wivelsted May 16, 2019 06:19 AM

Consider the issue resolved, thanks for the help.

But, what about RecurrenceExDate? Is that also deprecated? 
Supplying the "ExDates" directly with ReccurenceExDate works fine and they do not have to be in the RecurrenceRule. However, in the CRUD sample neither RecurrenceId or RecurrenceExDate is used, everything is supplied through the RecurrenceRule.

PS: The CRUD sample is not really set up for recurrence testing as the RecurrenceRule is nvarchar(50); barely enough to hold the simplest rule.




KK Karthigeyan Krishnamurthi Syncfusion Team May 17, 2019 01:17 AM

Hi Toke, 
 
Thanks for the update. 
 
No, RecurrenceExDate is functional. Most of the users requirement is to exclude some occurrence appointment in particular date during initial rendering, we provided RecurrenceExDate property for user convenience even though it can be achieved by altering the parent appointment rule with EXDATE. Since RecurrenceExDate is optional, we internally update the rule with EXDATE to handle the recurrence appointment in CRUD sample. RecurrenceId can be added only to the edited occurrence appointment and user requirement for RecurrenceId property is less as we maintain RECUREDITID in rule, we deprecated it. 
 
Sorry and kindly change the type to nvarchar(MAX). 
 
Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon