K
ken.pina
We are seeing an issue with custom Enterprise field columns within
Project Pro. I apologize in advance. This may get a little long.
The summary: We have created four Enterprise custom fields to track
various dates. We need to have those fields visible as columns within
each new project right when it is created. We've created a template
project plan that already has the columns set up as desired. When we
create projects manually with Project Pro, everything works
fine...meaning the newly created project has those four columns visible
right away. The problem is that when we create projects with code,
using the SAME template, those columns are NOT visible upon opening the
project with Project Pro. I know that we are getting the correct
template because any existing tasks and other data in the template is
carrying over just fine.
Here's the steps in a nutshell:
1. Open Project Pro 2007 (thick client)
2. Select File->New
3. Choose the template that already contains the Enterprise custom
fields that I want visible as columns
4. Save and publish the project to EPM 2007
5. Close Project Pro
6. Navigate to PWA and open the project from the Project Center into
Project Pro by clicking the Project icon in the grid
In that case I can see the Enterprise custom columns in Project
Pro...as desired.
I need to duplicate that process in code. Here's the basic steps I am
following in code:
1. Using the Guid of the same template as above, I call
CreateProjectFromTemplate()
2. Then using QueuePublish(), I publish the project
3. Navigate to PWA and open the project from the Project Center into
Project Pro by clicking the Project icon in the grid
In this case, those Enterprise columns are not visible in Project Pro
even though I created the project from the same template.
Code snippet (most of it from sample code):
***********************
Guid templateId = GetProjectTemplateGUID("Test Template 1");
Guid newProjectGuid =
project.CreateProjectFromTemplate(templateId,projectName);
// Wait 3 seconds for Queue job to complete.
System.Threading.Thread.Sleep(3000);
//Save to the Published database
string wssUrl = "";
bool fullPublish = true;
EPM_Project.ProjectRelationsDataSet dsProjectRelations = new
EPM_Project.ProjectRelationsDataSet();
dsProjectRelations = project.QueuePublish(Guid.NewGuid(),
newProjectGuid, fullPublish, wssUrl);
Project Pro. I apologize in advance. This may get a little long.
The summary: We have created four Enterprise custom fields to track
various dates. We need to have those fields visible as columns within
each new project right when it is created. We've created a template
project plan that already has the columns set up as desired. When we
create projects manually with Project Pro, everything works
fine...meaning the newly created project has those four columns visible
right away. The problem is that when we create projects with code,
using the SAME template, those columns are NOT visible upon opening the
project with Project Pro. I know that we are getting the correct
template because any existing tasks and other data in the template is
carrying over just fine.
Here's the steps in a nutshell:
1. Open Project Pro 2007 (thick client)
2. Select File->New
3. Choose the template that already contains the Enterprise custom
fields that I want visible as columns
4. Save and publish the project to EPM 2007
5. Close Project Pro
6. Navigate to PWA and open the project from the Project Center into
Project Pro by clicking the Project icon in the grid
In that case I can see the Enterprise custom columns in Project
Pro...as desired.
I need to duplicate that process in code. Here's the basic steps I am
following in code:
1. Using the Guid of the same template as above, I call
CreateProjectFromTemplate()
2. Then using QueuePublish(), I publish the project
3. Navigate to PWA and open the project from the Project Center into
Project Pro by clicking the Project icon in the grid
In this case, those Enterprise columns are not visible in Project Pro
even though I created the project from the same template.
Code snippet (most of it from sample code):
***********************
Guid templateId = GetProjectTemplateGUID("Test Template 1");
Guid newProjectGuid =
project.CreateProjectFromTemplate(templateId,projectName);
// Wait 3 seconds for Queue job to complete.
System.Threading.Thread.Sleep(3000);
//Save to the Published database
string wssUrl = "";
bool fullPublish = true;
EPM_Project.ProjectRelationsDataSet dsProjectRelations = new
EPM_Project.ProjectRelationsDataSet();
dsProjectRelations = project.QueuePublish(Guid.NewGuid(),
newProjectGuid, fullPublish, wssUrl);