# onEventChange

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

```javascript
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);
```
