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
rakiraki 

how to over write the Start and End fields in Active event Sobject

I'm doing some logical work on Active Event object. i got 3 custom fields objects on Active event object. Date__c(Date Fields),End_Time_c(Formula Field(TEXT(VALUE(LEFT( TEXT(Time_c) ,2))+1)&":00")), Time__c(Picklist).

 

What exactly Im looking for is a piece of code to use the data in those fields to populate the native Start and End date-time fields when an Event is created (only on creation – not on modify). The trigger should only fire if the Date_c and Time_c are populated.

 

 EX:- If  Date__c is 15/12/2012 & Time__c is 08:00 trigger should fire  Start field as  13/12/2012 08:00 & End field should be Date__c and End_Time__c that would be 15/12/2012 09:00.

is it possible to do that to over write the values after saving the record