question

21169824 avatar image
0 Votes"
21169824 asked RaytheonXie-MSFT commented

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

Why IsMilestone Task property Can I set on second publication via Project server 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?

office-sharepoint-server-developmentoffice-sharepoint-server-customization
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @21169824 ,
I am currently doing some research on this issue, will let you know as soon as possible

0 Votes 0 ·
RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered RaytheonXie-MSFT commented

Hi @21169824 ,
Since your issue is about Project online. Microsoft has a dedicated forum to discuss about Project online. You can get some more professional advice in the forum.
https://techcommunity.microsoft.com/t5/project/ct-p/Project



If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @21169824 ,
Since we are on different platforms, we are unable to contact the corresponding support staff. I am regretful that we cannot provide more help for this issue. If the issue is urgent to your business, it is recommended that you contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist you in a more efficient manner. Please be advised that you might be charged for phone support service. Please go to the website (https://support.microsoft.com/en-sg/help/4051701/global-customer-service-phone-numbers) to find related number and call it to create a new Phone Service Request to Microsoft Phone Support team.

0 Votes 0 ·
21169824 avatar image
0 Votes"
21169824 answered

Hi @RaytheonXie-MSFT,
First, I send this question on dedicated forum, but there is no answer.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.