Change Enterprise Project Type in Project Server 2016 using CSOM or SharePoint Designer Workflow

Ali 21 Reputation points
2023-06-04T14:18:27.19+00:00

I've covered below steps in Project Server 2016:

  1. Created a default Enterprise Project Type - 1 and Stage 1.
  2. Create a workflow in SharePoint Designer 2013 and associated with EPT1.
  3. Assigned PDP.
  4. I need to transit to next EPT2 and Stage2 from workflow of Stage1. 

 

I am looking for support that How to change Enterprise Project Type (EPT) in Project Server 2016 using CSOM or SharePoint Designer Workflow.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,802 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
549 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,597 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nandan Vallamdasu 20 Reputation points Student Ambassador
    2023-06-04T14:46:03.6433333+00:00

    To change Enterprise Project Type (EPT) in Project Server 2016 using CSOM, you can use the following steps:

    1. Import the Microsoft.Project.Server.Client.dll assembly into your project.
    2. Create a new instance of the Project class.
    3. Set the Project.Server property to the URL of your Project Server.
    4. Set the Project.Credentials property to a valid Windows user account that has permissions to modify Enterprise Project Types.
    5. Call the Project.ChangeEnterpriseProjectType method, passing in the ID of the existing Enterprise Project Type and the ID of the new Enterprise Project Type.
    6. Here is an example of how to change Enterprise Project Type using CSOM:
    
    using (var ctx = new ClientContext(serverUrl))
    {
       var project = new Project(ctx);
       project.Server = serverUrl;
       project.Credentials = new WindowsCredentials(userName, password);
       project.ChangeEnterpriseProjectType(existingEptId, newEptId);
    }
    
    

    How to change Enterprise Project Type (EPT) in Project Server 2016 using SharePoint Designer Workflow

    To change Enterprise Project Type (EPT) in Project Server 2016 using SharePoint Designer Workflow, you can use the following steps:

    1. Create a new SharePoint Designer workflow.
    2. In the workflow, add a new Action.
    3. In the Action, select the Change Enterprise Project Type action.
    4. In the Action, specify the following properties:
    • Enterprise Project Type ID: The ID of the new Enterprise Project Type.
    • Project ID: The ID of the project that you want to change the Enterprise Project Type for.
      1. Save the workflow and publish it to Project Server.
      Here is an example of how to change Enterprise Project Type using SharePoint Designer Workflow:
       
       <Workflow>
         <Action Name="ChangeEnterpriseProjectType">
           <SetList Scope="Project" ListItemProperty="EnterpriseProjectTypeID" Value="NewEPTID" />
         </Action>
       </Workflow>