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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Linking appointment occurences with recurrence series in Schedule

Thread ID:

Created:

Updated:

Platform:

Replies:

144611 May 14,2019 12:52 PM UTC May 17,2019 06:17 AM UTC ASP.NET MVC 5
loading
Tags: Schedule
Toke Wivelsted
Asked On May 14, 2019 12:52 PM UTC

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.

Vinitha Devi Murugan [Syncfusion]
Replied On May 15, 2019 01:47 PM UTC

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. 


Toke Wivelsted
Replied On May 15, 2019 07:02 PM UTC

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")         
}
...

Karthigeyan Krishnamurthi [Syncfusion]
Replied On May 16, 2019 10:55 AM UTC

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 


Toke Wivelsted
Replied On May 16, 2019 11:19 AM UTC

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.



Karthigeyan Krishnamurthi [Syncfusion]
Replied On May 17, 2019 06:17 AM UTC

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon