PDS ProjectCreate with template bug?

J

James Fraser

I'm running into unexpected behavior with the PDS, and I'm wondering if
anyone here has any fixes or easy work arounds.

When we issue a ProjectCreate via a PDS call with a valid template, things
seem to work well, and the tasks are copied from the template, but... All
tasks lose the predefined Task Outline Codes.

When I create a new project from a template in Project Professional, Task
outline codes are kept.

I know that the PDS doesn't allow for setting Task outline codes
specifically, but I really expected that a ProjectCreate using a template
would keep these, like "New Project..." in Project Pro. (Yeah, I know, no
scheduling...)


Any thoughts?...
James Fraser
 
T

tonyzink

I've experienced this phenomenon as well.

As a work-around, I stored the task code values in the task "Notes"
field for each task in the project schedule template, then I wrote a
macro that moves the code values from the "Notes" field to the correct
destination field for each task after project creation.

The user is trained to execute this macro once... immediately after the
project schedule has been created... and the macro is designed to run
only once. I accomplish this by flagging whether or not the macro has
already been run, and if it has not, then it moves the code values
(notice that I say "move"... not "copy"... this frees up the "Notes"
field for use later).

I suppose that if you wanted to design the solution for a monkey, then
you could even design it in such a way that it runs automagically every
time a project schedule is opened, since the macro checks whether or
not it's already been run...

Clear as mud?

If there's interest, then I can post details...

Good luck!

Tony Zink
========================================
http://www.msprojectreporter.com
http://www.pmreporter.com
http://www.sharepointreporter.com
http://www.msofficereporter.com
http://www.dotnetreporter.com
========================================
 
J

James Fraser

tonyzink said:
I've experienced this phenomenon as well.

Thank you, Tony for the confirmation and the possible fix.

I just finished writing a SQL script that can be called after the project is
created that will copy the values from the template. This doesn't take much,
since you can assume the outline codes exist if they are in the template, so
it's just copying a few rows:

insert into MSP_CODE_FIELDS (PROJ_ID, CODE_CATEGORY, CODE_REF_UID,
CODE_FIELD_ID, CODE_UID)
select @PROJ_ID, CODE_CATEGORY, CODE_REF_UID, CODE_FIELD_ID, CODE_UID
from MSP_CODE_FIELDS
where PROJ_ID= (Select PROJ_ID FROM MSP_PROJECTS where PROJ_TYPE = 1 and
PROJ_NAME = @template)
and CODE_FIELD_ID = 188744419

@DestProj_ID is the PROJ_ID of the newly created project
@template is a varchar with the name of the template used to create the
project
CODE_FIELD_ID is the identifier of the Outline code, in this case ETOC1.
(Note that the Task Outline Codes id's don't go up incrementally like the
project outline codes. Look them up in MSP_CONVERSIONS)


Hope this can help someone...
James Fraser
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top