public static EventListData Converter(Item input) { var data = new EventListData(); data.Id = input.ID.Guid.ToString("D"); data.Name = input.Fields["Title"].Value; var toField = (Sitecore.Data.Fields.DateField)input.Fields["To"]; data.To = toField.DateTime; var fromField = (Sitecore.Data.Fields.DateField)input.Fields["From"]; data.From = fromField.DateTime; var eventItem = new Sitecore.Modules.EventManager.Entities.EventItem(ItemUtil.GetContentItem(ID.Parse(data.Id))); try { data.Plan = AnalyticsHelper.GetPlanData(eventItem.EngangementPlanItem.ID.Guid); } catch (Exception exception) { Sitecore.Diagnostics.Log.Error("EventManager: Converter failed to convert engangement plan", exception, typeof(EventListData)); } return(data); }