To change Enterprise Project Type (EPT) in Project Server 2016 using CSOM, you can use the following steps:
- Import the Microsoft.Project.Server.Client.dll assembly into your project.
- Create a new instance of the Project class.
- Set the Project.Server property to the URL of your Project Server.
- Set the Project.Credentials property to a valid Windows user account that has permissions to modify Enterprise Project Types.
- Call the Project.ChangeEnterpriseProjectType method, passing in the ID of the existing Enterprise Project Type and the ID of the new Enterprise Project Type.
- 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:
- Create a new SharePoint Designer workflow.
- In the workflow, add a new Action.
- In the Action, select the Change Enterprise Project Type action.
- 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.
- Save the workflow and publish it to Project Server.
<Workflow>
<Action Name="ChangeEnterpriseProjectType">
<SetList Scope="Project" ListItemProperty="EnterpriseProjectTypeID" Value="NewEPTID" />
</Action>
</Workflow>