none
Is the project published? RRS feed

  • Question

  • How would I determine (via the PSI) if a project is published?  Don't readily see it it as a method or property.

    Thursday, October 7, 2010 8:00 PM

Answers

  • You can call the ReadProject() method which takes two parameters, projectUid and dataStore.  The dataStore parameter allows you to specify which database to read the project from (Draft, Published, Archive) using DataStoreEnum.  Basically, if you call this method using the UID of the project in question and DataStoreEnum.PublishedStore and the resulting dataset is null then the project represented by the given UID is not a published project.

    For example:

    bool _isPublished;
    
    ProjectWebService.ProjectDataSet projectDataSet = projectService.ReadProject(projectUID, ProjectWebService.DataStoreEnum.PublishedStore);
    
    _isPublished = projectDataSet != null;
    


    Project.ReadProject documentation - http://msdn.microsoft.com/en-us/library/ms480162.aspx


    Ed Snider

    Friday, October 8, 2010 4:44 AM

All replies