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
Jay_HunterJay_Hunter 

Any way to programatically create events?

One of my users challenged me to do something regarding events.  We have a custom project object.  On this object, there are 2 date fields, Start Date & End Date.  The project is owned by a user.  I would like to somehow programatically create a calendar event for this user with the start/end dates set from these fields.  There doesn't seem to be an easy way via a workflow rule, as it only seems to let you create tasks, and not events.

Seems like I would have to implement some sort of custom code to do this, any ideas or strategies suggested would be much appreciated.

--Jay Hunter
RickyGRickyG
Jay -

You could easily do this with an Apex trigger.  Not sure if there is any other way to do it at the present time.

Hope this helps.
gireeshgireesh
Thanks for the info, RickyG.  I am interested in doing something like this as well.   Could you point me to the Apex objects that I should focus on to get this done??


RickyGRickyG
I would start with the Apex home page - probably either the introduction to Apex or the Apex Developers Guide.

Hope this helps.