I'm using Process Builder and Visual Workflow to sync a custom appointment object and its "Room" selection picklist with the public resource calendars we set up for our conference rooms. Here's how it works:
1) The flow checks the Event for any existing EventRelations which represent the public calendars for our conference rooms.
2) If it finds any it deletes them to clear the way for the new conference room assignment.
3) It then creates a new EventRelation for the conference room calendar that corresponds with the Room selected on my custom object.
The public calendars are supposed to throw an error if they are already booked and someone tries to schedule them for the same time. However here's the behavior I'm experiencing:
1) I create a new Event and try to assign it to Conference Room 3. Conference room 3 is already booked at that time but the flow creates the EventRelation anyway! (If I try to access the Event via the browser and edit it I get the expected error message telling me that the resource is scheduled)
2) I realize that the meeting room was already assigned to I try to change it from Conference Room 3 to Conference Room 1.
3) The flow fires, I don't get any errors and yet the event still shows Conference Room 3. It's like it gets stuck.
For the record I have shown that the flow successfully updates the conference room as expected as long as neither of the rooms are booked at that time. So there are 2 problems I see here:
1) The booked room should not have been allowed to be assigned in the first place.
2) Once added, I can't seem to use my flow to delete the offending room.
So what's my question? Why does the standard validation not fire when the EventRelation is created using flow? And why can't I delete an EventRelation which had a conflict? Thanks!