none
Obtain Project Plan Template UID from the Enteprise Project Type UID (EPT UID) RRS feed

  • Question

  • Hi all, I need some help from the Project Server Community,

    I need to develop an WebPart thar will display information based on the "Project Plan Template" Tasks, as you know Plan Templates are located according to the Project Server Documentation here:

    SELECT PROJ_NAME, PROJ_UID FROM [PROJECT_SERVER_DRAFT_DB].[MSP_PROJECTS] WHERE PROJ_TYPE = 1

    This WebPart will be deployed in all Projects Collaboration Sites (SPWeb), so in some way i need to find out what is the "Project Plan Template" UID from the "Current Project UID" (where current project means the project of the currente Web Collboration Site):

    string projectGuid = SPContext.Current.Web.AllProperties["MSPWAPROJUID"] as string;

    So far, i have the way to find the UID of the EPT through a query in the reporting DB: 

    SELECT 
    	 [EPT].*
      FROM 
         [dbo].[MSP_EpmProject_UserView] as UV inner join
         [MSP_EpmEnterpriseProjectType] as EPT on  EPT.EnterpriseProjectTypeUID = UV.EnterpriseProjectTypeUID
        WHERE [UV].ProjectUID = "CURRENT Project" 

    So at this point is where i dont find the way to connect the obtained EPT UID to the Project Template. For me is obvious that has to be a way to connect both because "EPT Screen" Contains a "Project Template"
    See project server page Project Template is a property of the EPT:

    http://localhost/pwa/_layouts/PWA/Admin/EnterpriseProjectTypeDetails.aspx?entProjectTypeUid="EPT UID"

    And also because when you export with playbook the project server metadata configuration you can see in the XML generated the connection between both EPT and project template:
    ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID

    <EnterpriseProjectType>
        <ENTERPRISE_PROJECT_TYPE_UID>e81126fd-1cf0-483e-902c-5e4364301719</ENTERPRISE_PROJECT_TYPE_UID>
        <ENTERPRISE_PROJECT_TYPE_NAME>Customization &amp; Delivery</ENTERPRISE_PROJECT_TYPE_NAME>
        <WORKFLOW_ASSOCIATION_UID>3f3037f1-2882-477c-a0ef-43d5750020d9</WORKFLOW_ASSOCIATION_UID>
        <WORKFLOW_ASSOCIATION_NAME>WF2</WORKFLOW_ASSOCIATION_NAME>
        <IS_DEFAULT_PROJECT_TYPE>false</IS_DEFAULT_PROJECT_TYPE>
        <ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID>9c9b56df-6ca7-4c86-9572-1f3dcb6c13c9</ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID>
        <ENTERPRISE_PROJECT_WORKSPACE_TEMPLATE_NAME>{EEE2B515-B7B8-4517-9839-140C513CD71C}#Site Template 6.3</ENTERPRISE_PROJECT_WORKSPACE_TEMPLATE_NAME>
        <ENTERPRISE_PROJECT_TYPE_ORDER>31</ENTERPRISE_PROJECT_TYPE_ORDER>
      </EnterpriseProjectType>
    So, Can anyone help me to find this "EPT to Project Template Association"? 
    Can i find it via PSI Project Server Intergace, or via SQL in one of the 4 project server DB?
    SQL via is preffered .
    Regards, Jacobo  


    Jacobeo


    • Edited by Jacobeo Wednesday, February 6, 2013 8:20 AM
    Wednesday, February 6, 2013 8:20 AM

Answers

All replies

  • Hi all, I need some help from the Project Server Community,

    I need to develop an WebPart thar will display information based on the "Project Plan Template" Tasks, as you know Plan Templates are located according to the Project Server Documentation here:

    SELECT PROJ_NAME, PROJ_UID FROM [PROJECT_SERVER_DRAFT_DB].[MSP_PROJECTS] WHERE PROJ_TYPE = 1


    This WebPart will be deployed in all Projects Collaboration Sites (SPWeb), so in some way i need to find out what is the "Project Plan Template" UID from the "Current Project UID" (where current project means the project of the currente Web Collboration Site):

    string projectGuid = SPContext.Current.Web.AllProperties["MSPWAPROJUID"] as string;

    So far, i have the way to find the UID of the EPT through a query in the reporting DB: 

    SELECT 
    	 [EPT].*
      FROM 
         [dbo].[MSP_EpmProject_UserView] as UV inner join
         [MSP_EpmEnterpriseProjectType] as EPT on  EPT.EnterpriseProjectTypeUID = UV.EnterpriseProjectTypeUID
        WHERE [UV].ProjectUID = "CURRENT Project" 

    So at this point is where i dont find the way to connect the obtained EPT UID to the Project Template. For me is obvious that has to be a way to connect both because "EPT Screen" Contains a "Project Template"

    See project server page: 

    http://localhost/pwa/_layouts/PWA/Admin/EnterpriseProjectTypeDetails.aspx?entProjectTypeUid="EPT UID"

    And also because when you export with playbook the project server metadata configuration you can see in the XML generated the connection between both EPT and project template:

    ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID

      <EnterpriseProjectType>
        <ENTERPRISE_PROJECT_TYPE_UID>e81126fd-1cf0-483e-902c-5e4364301719</ENTERPRISE_PROJECT_TYPE_UID>
        <ENTERPRISE_PROJECT_TYPE_NAME>Customization &amp; Delivery</ENTERPRISE_PROJECT_TYPE_NAME>
        <WORKFLOW_ASSOCIATION_UID>3f3037f1-2882-477c-a0ef-43d5750020d9</WORKFLOW_ASSOCIATION_UID>
        <WORKFLOW_ASSOCIATION_NAME>WF2</WORKFLOW_ASSOCIATION_NAME>
        <IS_DEFAULT_PROJECT_TYPE>false</IS_DEFAULT_PROJECT_TYPE>
        <ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID>9c9b56df-6ca7-4c86-9572-1f3dcb6c13c9</ENTERPRISE_PROJECT_PLAN_TEMPLATE_UID>
        <ENTERPRISE_PROJECT_WORKSPACE_TEMPLATE_NAME>{EEE2B515-B7B8-4517-9839-140C513CD71C}#Site Template 6.3</ENTERPRISE_PROJECT_WORKSPACE_TEMPLATE_NAME>
        <ENTERPRISE_PROJECT_TYPE_ORDER>31</ENTERPRISE_PROJECT_TYPE_ORDER>
      </EnterpriseProjectType>

    So, Can anyone help me to find this "EPT to Project Template Association"? 

    Can i find it via PSI Project Server Intergace, or via SQL in one of the 4 project server DB?

    SQL via is preffered .

    Regards, Jacobo


     


    Jacobeo

    Wednesday, February 6, 2013 8:09 AM
  • Wednesday, February 6, 2013 12:54 PM
    Moderator