none
How to set project's Task_WBS By Code----PSI? RRS feed

  • Question

  • hi all,

          Can't set the project's Task_WBS by code?but PSI have a method Task_WBS,I use it , the database is altered ,but when open this project by Professional , the WBS didn't alter ,while  in PWA site ,the Task_WBS of the project is altered.

    Friday, May 25, 2012 9:55 AM

Answers

All replies

  • Hi Nicky--

    When you add a task to a ProjectDataSet, do not set the TASK_WBS property. The TASK_WBS property is read-only, although it is marked as read/write in the PSI. If you add a task with the TASK_WBS property set to a specified value, Project Professional ignores the value set from the PSI and assigns a value according to the task outline position when you open the project. To see the result in Project Professional, check the WBS code value on the Advanced tab of the Task Information dialog box.
    http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.task_wbs.aspx

    See more info by Brian's blog post (though it's for PS2007, Same stands for PS2010)
    http://blogs.msdn.com/b/brismith/archive/2007/06/19/you-can-t-change-the-task-work-breakdown-structure-wbs-value-from-the-psi.aspx

    Please see PSI limitations:What the PSI Does Not Do
    http://msdn.microsoft.com/en-us/library/ee767706.aspx

    Hope this helps.


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    • Marked as answer by Nicky L Tuesday, September 4, 2012 12:17 PM
    Friday, May 25, 2012 11:18 AM
  • Hi Amit,

    I'm so sorry to see your reply,I have been know this result,there is a new problem that bothers me now.

    I use project template to create project by PSI,why the work space is not found? before it's ok!

    Tuesday, September 4, 2012 12:24 PM
  • Hi Nicky,

    When you create a project using PSI - project web service's method CreateprojectFrom template:
    http://msdn.microsoft.com/en-us/library/office/gg211556

    This method creates a project in draft database & by design the workspace is not created. Workspace is created only when the first time project is published. So Once you create a project first time, You can also call the QueuePublish method which has a parameter to WssURL (by default if you have string.empy for WssURL, it creates a project site with PWA url+ProjectName)
    http://msdn.microsoft.com/en-us/library/office/gg177147

    jobId = Guid.NewGuid();
                projectSvc.QueuePublish(jobId, projectId, true, String.Empty);

    Hope that helps.


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Wednesday, September 5, 2012 6:47 AM