We’re not using the data processor that comes with the scheduler. Right now, we have a bug that I’m hoping you can help with.
If I add an event, the scheduler updates with the event, and then I call our own method via json to add the event to our database.
If I then try to delete the event, it deletes fine from the scheduler UI, but it does NOT delete from the database because the id the scheduler is storing is NOT the same as the database id.
To address this, I tried 2 things.
Calling $$(“scheduler”).load AFTER I added the contact, so the scheduler would refresh and have the correct ID. The result was TWO identical events on the scheduler.
Then I tried updating the id of the event after a successful database add. I tried this two different ways.
id = $$("scheduler").$$("id").getValue();
$$("scheduler").item(id).id = data['new_id'];
After that, if I do this: alert($$(“scheduler”).$$(“id”).getValue()); the correct ID is returned.
However, when I do a delete, the id that goes into the delete function is the OLD ID.
dhx.alert(“Event has been deleted”);