function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Francesco DessìFrancesco Dessì 

Is it possible edit a single event in an event series using Apex?

In the UI, I can chose if edit a single event or the entire event series:

User-added image

I would like to edit a single event of a series also using apex code. Is it possible?

I've tried a normal update on a specific record, but also the entire series is updated. For example, if I edit the Location field (or a custom field) of a single event, I’ll find the same value also in all other events in the series.

Event event = [SELECT Id, Test_field__c, Location FROM Event WHERE Id = '00U7R000011QGPBUA4'];

event.Location = 'Rome';

update event; // --> After the update all events in the series have Rome as Location.  
mukesh guptamukesh gupta
Hi Francesco,

I have test this scanario my side. but Only specific Event record location updated instead of all event location. if you try to update 00U7R000011QGPBUA4  then only this Event location got update

Please check again

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh 
Francesco DessìFrancesco Dessì
Hi Mukesh,
thank you for your reply. I’ve tried again, but the result was the same.
Maybe, you have tested with a non-recurring event.
Could you try with a recurring event?
I’ve created the event series from the UI, checking the Repeat checkbox and setting 100 times.
The result was 100 event records and if I edit the Location of one of those records all other 99 records will update.

User-added image