FIELD_INTEGRITY_EXCEPTION: An event can't last longer than 14 days Salesforce exception

FIELD_INTEGRITY_EXCEPTION: An event can't last longer than 14 days exception occurs when the difference between Start Date/Time and End Date/Time is greater than 14 days.


Sample Code:

  1. Event objEvent = new Event(Subject = 'Test', StartDateTime = System.now(), EndDateTime = system.now().addDays(15));  
  2.   
  3. insert objEvent;  


No comments:

Post a Comment