Following up on my previous blog post, Enable on-demand Project Site creation for your PMO, my second demo at InspireX was to show how you could a similar process to collect requests in a SharePoint Site and then create projects in Project Server automatically.
One of the limitations, that Alex Burton covers in his post, is that the project you create will always get created using the default Enterprise Project Type in project Server. This could be a problem if you have multiple project Types, and you would like the workflow to create the correct project type.
In this post I will show you how to work around that issue.
For the sake of this post, I will assume you have read through Alex's post, and treat this as an extension of that workflow.
Step 1: Add a column to the Project Request List
Go ahead and add two columns to the SharePoint List, namely, Project Type. Make it a choice column.
You could add it to the form, and let the users pick this field, while creating a project request, or the approver could set it once he/she approves the request ( via Task Form).
Step 2: Get a list of all your Project template GUIDs and Enterprise Project Type GUIDs
Now, open up SQL Server Management Studio, run a couple of queries.
Query to get the GUIDs for Project Templates: SELECT PROJ_NAME, PROJ_UID FROM draft.MSP_PROJECTS WHERE PROJ_TYPE = 1
Query to get the GUIDs for Enterprise Project Types: SELECT EnterpriseProjectTypeName,EnterpriseProjectTypeUID from MSP_EpmEnterpriseProjectType
In my case the information was as below:
|EPT name||EPT GUID||Template GUID|
Step 3: Modify the Workflow
For the sake of brevity, I will assume you have set up the workflow, and also have a way of selecting the project type at approval or after approval. I will only cover the steps that require to be added to Alex Burton 's workflow.
That's pretty much it. Now you can create projects in Project server, AND also have the projects to be of your desired type.
Now, this post assumes that the project site template is same for all project types. If the project site template is different for different project types, then you might need to defer the creation of the project site until after you create and change the project to your desired type.
Hope that helps!