How to control live update


I want to understand how i can control live update trigger in Scheduler.
Lets say if i am creating event at one side. On another side i should be able to perform some action before the event is pasted on the calendar… or i can stop pasting event…?



Basic version of live update doesn’t provide such functionality.

We are going to update it and expand opportunities so it becomes possible, but I can’t specify the date when it will be implemented.

Currently you can use this custom version
and customize it more as you wish :slight_smile:

Changes from other clients are applied here

You can add some extra entry point to handle something. For example, change the code in the next way:

client.subscribe('/update', function (message) {
     var updateSignal = JSON.parse(message);
     if(scheduler.callEvent("onBeforeLiveUpdate", [updateSignal]) !== false){

Then in your code you can do

scheduler.attachEvent("onBeforeLiveUpdate", function(updateSignal){
    // updateSignal -> {sid: clientId, tid: databaseId, status:"updated|inserted|deleted", data:eventObject}
   // modify updaetSignal to preprocess changes
  // or
   return false;// cancel update

Hi Thank you so much.
This worked for me 10/10. :sunglasses: