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
mstrattmstratt 

How to make a date field from a custom object automatically be added to a calendar?

Within Salesforce, there is currently no standard functionality that will allow this.  We have an installations custom object on our Accounts Page. In the installations field, there is a project start date and project end date. We would like to, ideally, have the project start and end date automatically be added to a public calendar (and have the account remain associated to the installation). Does anyone know how to do this or have any suggestions?
werewolfwerewolf
You could probably write an Apex trigger on after insert of your Installations object which inserts an Event into your public calendar.
mstrattmstratt
How do I do that? I am just learning coding, etc so a detailed description would be amazingly helpful!
werewolfwerewolf

Funny, I was going to write at the end of my first post "no, I don't have any sample code that does this," because I don't.  The procedure is like this:

 

Make an after insert trigger on your object

In it, create an Event object whose start datetime and end datetime equal whatever datetime you're taking from your object

Insert your event

 

Now the question is, how do you associate that with a public calendar?  The answer is, I'm not sure.