locked
Get the project Owner throught the owner Guid RRS feed

  • Question

  • Hi All,

    I would like to Get the Project Owner Name through the GUID.

    I have explored SvcProject, SvcResource, SvcWorkflow WebServices but didnot yet find any direct method to capture that.

    Anyone has already done this??

    Thanks.

    Monday, November 21, 2011 6:07 AM

Answers

  • HI there,

    The quick & easy to find the ProjectOwnerResourceGuid is querying the reporting database:

    SELECT [ProjectUID]
          ,[ProjectName]
          ,[ProjectOwnerResourceUID]
      FROM [dbo].[MSP_EpmProject_UserView]

    Use a Join with dbo.MSP_EpmResource_UserView & you will get the resource Name.

    From PSI also you can check the Project owner guid from projectdataset
    Here is the sample code:
    http://msdn.microsoft.com/en-us/library/gg210536.aspx
       // Create an empty ProjectDataSet that contains the complete schema.
                    SvcProject.ProjectDataSet myProjectsDs2 = new SvcProject.ProjectDataSet();

                    Console.WriteLine("Projects I own:");

                    for (int i = 0; i < projectDs.Project.Count; i++)
                    {
                        tempProjDs = projectClient.ReadProject(projectDs.Project[i].PROJ_UID,
                            SvcProject.DataStoreEnum.WorkingStore);

                        if (tempProjDs.Project[0].ProjectOwnerID == myUid)
                        {

                        }


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Monday, November 21, 2011 7:56 AM

All replies

  • Hi,

    Have a look at ReadResource in SvcResource. http://msdn.microsoft.com/en-us/library/gg238402.aspx

    Pass in the Guid and retrieve the name.

    Regards,

    Stefan

    Monday, November 21, 2011 7:30 AM
  • HI there,

    The quick & easy to find the ProjectOwnerResourceGuid is querying the reporting database:

    SELECT [ProjectUID]
          ,[ProjectName]
          ,[ProjectOwnerResourceUID]
      FROM [dbo].[MSP_EpmProject_UserView]

    Use a Join with dbo.MSP_EpmResource_UserView & you will get the resource Name.

    From PSI also you can check the Project owner guid from projectdataset
    Here is the sample code:
    http://msdn.microsoft.com/en-us/library/gg210536.aspx
       // Create an empty ProjectDataSet that contains the complete schema.
                    SvcProject.ProjectDataSet myProjectsDs2 = new SvcProject.ProjectDataSet();

                    Console.WriteLine("Projects I own:");

                    for (int i = 0; i < projectDs.Project.Count; i++)
                    {
                        tempProjDs = projectClient.ReadProject(projectDs.Project[i].PROJ_UID,
                            SvcProject.DataStoreEnum.WorkingStore);

                        if (tempProjDs.Project[0].ProjectOwnerID == myUid)
                        {

                        }


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Monday, November 21, 2011 7:56 AM