Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2022, 03:19 AM
sytec sytec is offline Why IsMilestone Task property Can I set on second publication via CSOM? Windows 10 Why IsMilestone Task property Can I set on second publication via CSOM? Office 2016
Novice
Why IsMilestone Task property Can I set on second publication via CSOM?
 
Join Date: Apr 2022
Posts: 6
sytec is on a distinguished road
Default Why IsMilestone Task property Can I set on second publication via CSOM?

Hello.

Why IsMilestone Task property Can I set on second publication via Project server CSOM?

I have this code:

csom.DraftProject draft = project.CheckOut();
context.Load(draft.Tasks, dt => dt.Where(t => t.Id == taskUID));
context.ExecuteQuery();


csom.DraftTask task = draft.Tasks.First();
task.ActualStart = task_Act_Start;
task.ActualFinish = task_Act_Start;
task.PercentComplete = 100;
task.IsLockedByManager = true;
task.IsMilestone = true;
draft.Update();
csom.JobState jobState = context.WaitForQueue(draft.Publish(true), Consts.DEFAULTTIMEOUTSECONDS);

BUT task.IsMilestone = true; works only after second publication:

csom.DraftProject draft = project.CheckOut();
context.Load(draft.Tasks, dt => dt.Where(t => t.Id == taskUID));
context.ExecuteQuery();
csom.DraftTask task = draft.Tasks.First();
task.IsMilestone = true;
draft.Update();
csom.JobState jobState = context.WaitForQueue(draft.Publish(true), Consts.DEFAULTTIMEOUTSECONDS);

How can I do it with one publication?
Reply With Quote
Reply

Tags
c#

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing a 8.5 x 11 format publication billwill Word 7 04-14-2018 05:56 AM
Competing a task in Outlook does not automtically complete the linked task in OneNote OneGoat OneNote 0 06-22-2017 05:55 AM
Changing page size after publication is created tattoued Word 9 05-01-2015 11:22 AM
Why IsMilestone Task property Can I set on second publication via CSOM? Copy and Paste of a Task...Including all of the Task's 'children'...to a new task KRTSTARRYNIGHT Project 1 07-01-2014 06:54 AM
Why IsMilestone Task property Can I set on second publication via CSOM? Mid-Task resource scheduled 0 hours increasing task duration needlessly DarlaWeber Project 1 01-31-2014 02:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft