Can't set duration field on new task using CSOM

I'm trying to update the duration field on tasks using CSOM, but the following is happening. If the task already has a duration value, then CSOM sets the new value without a problem. But if the task still doesn't have a value, then the new value added by CSOM, doesn't get saved.

This is my data:

Can't set duration field on new task using CSOM

For instance, if in the code I set the value of task "dois" to "2.00" then on the project schedule, I'll see "2d". However, if I in the code I set the value of "um" to "5.00", then when I check the schedule again, the duration field for "um" will still be blank. Furthermore, when I'm reading the duration value for "um" using CSOM, the value is actually "1d" and not blank as it appears on the project schedule.

Any ideas?

Replay

This behaviour is not meet me before , but I will try to mention some hint to investigate and solve your issue:

  • Instead of updating the duration try to set the start date and end date and check if the duration field calculated correctly ,
  • Then check in your code How you add duration field , it should be a duration data type.
  • Also, check the type of scheduling is it auto schedule or manual schedule, it should be manual.
  • Regarding "when I'm reading the duration value for "um" using CSOM, the value is actually "1d" and not blank" it's not mean you update it correctly. I think it's the default value of the duration field so try to add duration from code as 2 days and check also the retrieving value.
Category: csom Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.108 (s). 12 q(s)