none
Update task start and finish with JSOM

    Pertanyaan

  • I trying to use the method set_finish and set_start to update the task's finish and start date. When the project is published and checked in the dates appear in the schedule with the new values, however if i use JSOM to get the tasks and its finish and start dates i get the old value before i update, and not the knew one.

    I looked at the serve log and has the folowing error:

    Exception occured in scope Microsoft.ProjectServer.DraftTask.set_Start. Exception=System.FormatException: String was not recognized as a valid DateTime.     at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)     at Microsoft.SharePoint.Client.DataConverter.ToDateTime(XmlNode node, ProxyContext proxyContext)     at Microsoft.ProjectServer.DraftTaskServerStub.SetProperty(Object target, String propName, XmlNode node, ProxyContext proxyContext)     at Microsoft.SharePoint.Client.ServerStub.SetPropertyWithMonitoredScope(Object target, String propertyName, XmlNode node, ProxyContext proxyContext)         3629679e-9961-400a-a04c-87d2a1d2da75

    05/14/2018 17:45:24.22              w3wp.exe (0x5B0C)                                     0x5ED0 SharePoint Foundation                CSOM                                          agmjp   High      Original error: System.FormatException: String was not recognized as a valid DateTime.     at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)     at Microsoft.SharePoint.Client.DataConverter.ToDateTime(XmlNode node, ProxyContext proxyContext)     at Microsoft.ProjectServer.DraftTaskServerStub.SetProperty(Object target, String propName, XmlNode node, ProxyContext proxyContext)     at 

    What could be the correct way to put finish and start date using JSOM?

    15 Mei 2018 16:54

Jawaban

  • I realize that i just have to put the duration to set the finish task date. It worked for me, but i still dont know how to update a task finshi and start by theses methods set_finsh() and set_start()
    • Ditandai sebagai Jawaban oleh Vhwn 15 Mei 2018 17:27
    15 Mei 2018 17:27