none
MS Project Task Identifier RRS feed

  • Question

  • I am working with VS.Net 2010 and MS Project. I have a report that traces a selected task back to the project start. this works fine with a single project. If i run the report on a linked project, it seems to go haywire. All of the Task id's, UniqueID's, and GUID's seem to just change on the fly... There has to be some unique identifier that never changes that is used by MS Project to identify each task..

    Can someone help me out??

     

     

    Wednesday, January 11, 2012 6:42 PM

Answers

  • try using the PredecessorTasks collection of the task from which you are tracing. it will give you hooks to all the predecessors regardless of the project they are in. it saves you from having to try to get individual hooks to each task using ID or UID. You can also use SuccessorTasks to get a collection of all the predecessor for a given task.


    Brian Kennemer – DeltaBahn Senior Architect
    endlessly obsessing about Project Server…so that you don’t have to.
    Blog | Twitter | LinkedIn
    • Marked as answer by Bruce Song Thursday, January 26, 2012 9:50 AM
    Thursday, January 12, 2012 12:18 AM

All replies

  • Task UniqueID is only unique within a project. If your code is going to go across projects you will want to use a combination of ProjectName and Task UID.


    Brian Kennemer – DeltaBahn Senior Architect
    endlessly obsessing about Project Server…so that you don’t have to.
    Blog | Twitter | LinkedIn
    Wednesday, January 11, 2012 10:00 PM
  • I would be happy to use a combination of any columns. UniqueID is not an identifier... it changes when you link projects together.

    When you loop through the tasks in the top level project, you get the UniqueID from the top level project. which is not a problem, except for the fact that when you start looking at task.PredecessorTasks

    Let me define the problem a little better.

    1. when looping through the problems and then looping through the predecessorTasks, the predecessorTasks are not there for tasks that are external.. so you have to have some way to look up the task in the original project to get the predecessors.

    2. when you open the sub project to look up the task, this works most of the time. But i have found instances where for some reason it gives me a different ID and UniqueID than the ones that are in the sub project or the Top level project, and i don't know where the numbers come from.

    With all of the re-numbering of tasks, and the different places you find the same task with different ID's and UniqueID's there has to be some key or unique Indentifier that tells MS project which task it is dealing with.

    Someone has to know what this is... and it isn't task.Guid cause it is not unique.

     

     

     

    Wednesday, January 11, 2012 11:24 PM
  • try using the PredecessorTasks collection of the task from which you are tracing. it will give you hooks to all the predecessors regardless of the project they are in. it saves you from having to try to get individual hooks to each task using ID or UID. You can also use SuccessorTasks to get a collection of all the predecessor for a given task.


    Brian Kennemer – DeltaBahn Senior Architect
    endlessly obsessing about Project Server…so that you don’t have to.
    Blog | Twitter | LinkedIn
    • Marked as answer by Bruce Song Thursday, January 26, 2012 9:50 AM
    Thursday, January 12, 2012 12:18 AM