+ Start a Discussion
Baz DensonBaz Denson 

create events without clashes

Requirement from my client.

"Take the creation of an event in the Sales (Opportunity) Object and called ‘Appointment’ and create a task for the sale (opp) owner at 9.15am on the morning of the appointment (whatever time the appointment is) to call the customer.  In the (rare) event the same user has more than 1 in a day then they should be scheduled in the time order of the appointments."

I can build a process builder to create the event but how to I ensure I don't have any clashes?
Khan AnasKhan Anas (Salesforce Developers) 
Hi Baz,

Greetings to you!

Create a trigger which will warn users when they're creating a conflicting event. This works wherever a user is editing an event, even when they aren't in a position to see the calendar. Please refer to the below links which might help you further with the above requirement.

https://dayback.com/date-range-conflicts-salesforce/

https://developer.salesforce.com/forums/?id=9060G0000005YBsQAM

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Baz DensonBaz Denson
Thanks Khan. The Event will be created automatically as part of a process builder so there is no communication with a user. I want to automatically move the event time if there is already an existing event.