While Updating Event from Custom VF page getting Error as Duration: Duration and EndDateTime must match
Error as Update failed. First exception on row 0 with id 00U1100000347ZNEAY; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Duration and EndDateTime must match.: [DurationInMinutes].
Please let me know if anyone encountered same situation and have any suggestion to overcome on this.
this is the time in minutes between the datatime StartDatetime and the datatime EndDateTime.
Event event = CTestMethode.Creation_Event(); datetime datestart = Datetime.newInstance(2015, 20 , 12, 00, 00, 00); datetime dateend = Datetime.newInstance(2015, 20 , 12, 01, 00, 00); event.EndDateTime = datetend; event.StartDateTime = datestart ; event.ActivityDateTime = datestart ; event.DurationInMinutes = 60;
Please post this question in one of the developer forums for a quick response, this forum is more focussed towards the declarative side of things.https://developer.salesforce.com/forums