I'm trying to create a timeline based on a task list from a provider-hosted add-in. I have found out how it works and I'm able to create the task list and add the timeline web part, but I can't add or update the necessary properties on the task list to get the items to actually show on the timeline.
I'm currently getting the list by:
var list = clientContext.Web.Lists.GetByTitle("Tasks"); clientContext.Load(list, l => l.RootFolder.Properties); clientContext.ExecuteQuery();
This works fine i get to see all the properties and if I manually add the tasks to a timeline I can see how it changes. But when I try to change the properties or just add them it doesn't work. I have tried to following to get it to stick:
list.RootFolder.Properties.FieldValues.Add("TimelineAllViews", "Timeline"); list.RootFolder.Properties.FieldValues.Add("TimelineDefaultView", "Timeline"); list.RootFolder.Properties.FieldValues.Add("Timeline_Timeline",WebPartXML.TimelineXML); list.RootFolder.Update(); clientContext.ExecuteQuery();
I have also tried to load the list and/or folder before updating and also using update on list and/or folder.
Thanks for any help.