onEventChange

The event occurs the user moves or modifies an event. getFieldValue('controlId.changedEvent') or eventArgs.details can be used to determin the changed event

You can get mor information about the effects:

  1. the event before the change: getFieldValue('myCalendarControl.oldEvent')

  2. other events that got affected: getFieldValue('myCalendarControl.relatedEvents')

You can call cancelCalendarChanges to cancel all the changes

let eventObj = app.getFieldValue("myCal.changedEvent");
let record = app.loadConfigRecordById("appointment", eventObj.id);
record.data.aStart = eventObj.start;
record.data.aEnd = eventObj.end;
app.saveConfigRecord("appointment", record);

Last updated