So I made a script that can create, edit and delete events.
To find an event that I previously created, I save the $itemId and the $changeKey locally, and then get the event later on using:
The problem however is that if the event no longer exists, this results in a FATAL ERROR.
Uncaught garethp\ews\API\Exception\ExchangeException: The specified object was not found in the store., The process failed to get the correct properties.
So what I need is to first check if the item still exists, before trying to do getCalendarItem().
I do not want to do getCalendarItems($start, $end) on the "surrounding dates" to see if an event still exists, that would be too slow. Is there any other way to not make the script return a FATAL ERROR when no objects are found?
So I made a script that can create, edit and delete events. To find an event that I previously created, I save the $itemId and the $changeKey locally, and then get the event later on using:
$item= $calendar->getCalendarItem($itemId, $changeKey);
The problem however is that if the event no longer exists, this results in a FATAL ERROR.
Uncaught garethp\ews\API\Exception\ExchangeException: The specified object was not found in the store., The process failed to get the correct properties.
So what I need is to first check if the item still exists, before trying to do getCalendarItem().
I do not want to do getCalendarItems($start, $end) on the "surrounding dates" to see if an event still exists, that would be too slow. Is there any other way to not make the script return a FATAL ERROR when no objects are found?