As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7); var currentDate = new Date(); var testList = companyhome.childByNamePath("Sites/sitenamegoeshere/dataLists/b2c74e68-1ccf-494e-83a6-b36049d2607a"); // note: no error checking, or seeing if dataLists or this particular datalist even exists var testEntry = testList.createNode(null, "dl:task"); testEntry.properties["cm:title"] = document.name; testEntry.properties["cm:description"] = document.name; testEntry.properties["dl:ganttStartDate"] = currentDate; testEntry.properties["dl:ganttEndDate"] = futureDate; testEntry.properties["dl:taskPriority"] = "High"; testEntry.properties["dl:taskStatus"] = "Not Started"; testEntry.save(); testEntry.createAssociation(people.getPerson("assigneeusername"),"dl:taskAssignee");