onAfterUpdate event not firing after save

Background: We are splitting events that span multiple days into multiple appointments. We would like to have them show up as multiple appointments after save.

I am trying to use the dataprocessor “onAfterUpdate” to force the reload. I have noticed that the onAfterUpdate event is only firing if there is an error (action.Type = DataActionTypes.Error;).

Am I missing something in the configuration? Or is this how the event functions?

scheduler.LoadData = true;
scheduler.EnableDataprocessor = true;
scheduler.UpdateFieldsAfterSave();

Please try the newest version of the package from NuGet. The problem should be fixed there

Looks like the new version is catching the deleted action but it still isn’t catching the insert or update.

Looks like the event will fire if the Native save will call the onAfterUpdate

return Content(new AjaxSaveResponse(action), "text/xml");

Using Custom Save with a return type as below onAfterUpdate is only called on error and deleted

return Content(new SchedulerFormResponseScript(action, appointment));

Any thoughts?

After a lot of digging and searching I was able to determine why the insert doesn’t fire the onAfterUpdate event that was attached. This is the code that is auto-gen from the scheduler. node.attributes is undefined so it throws an exception and causes execution to stop. Does anyone know why it is undefined? Or what is should contain?

scheduler.dataProcessor.attachEvent('onAfterUpdate', function (s_id, action, t_id, node) {
        if(action == 'inserted' || action == 'updated'){
            var ev = scheduler.getEvent(t_id);
            for(var i = 0; i < node.attributes.length; i++){
                var attr_name = node.attributes[i].name;
                if(attr_name.indexOf('dhx_') != 0)
                    continue;               
                var property_name = attr_name.replace('dhx_', '');
                
                if(ev[property_name] instanceof Date || property_name == 'start_date' || property_name == 'end_date'){
                    ev[property_name] = scheduler.templates.xml_date(node.attributes[i].value);
                }else{
                    ev[property_name] = node.attributes[i].value;
                }
            }
            scheduler.updateEvent(t_id);
        } 
        
    });