Mombu the Microsoft Forum

Go Back   Mombu the Microsoft Forum > Microsoft > MICROSOFT PROJECT (TECHNET) > PS2007 PSI: Adding an enterprise resource to a project problem
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 3rd March 06:02
skaarj
External User
 
Posts: 1
Default PS2007 PSI: Adding an enterprise resource to a project problem



Hello again,

my second problem is also regarding Project Server 2007 and the PSI
web service.

With Project Prof. 2007 I created a fresh new project and added two
enterprise resources, then I saved this project into Project Server
2007. There are no tasks, assignments or anything else, just the
project and two added enterprise resources which I can see in the
"Resource usage" view. Also the project is not published just saved.
My small C# project now can check-out this project into a
ProjectDataSet and there in the ProjectResource table are stored the
two enterprise resources, ready to be assigned to work :-)

Ok, what I did with Project Prof. 2007 shall now do my small C#
project too. It can create a fresh new project and check-out it, but
to add now an enterprise resource is after uncounted tries an
unresolvable problem. I am not able to add an enterprise resource to a
project, like what I did with Project Prof 2007. Besides, the SDK only
describes how to add *new* ("ad-hoc created") resources to a project
but not existing enterprise resources.

My idea is when a resource already exists, like an enterprise resource
in Project Server 2007, the RES_UID should be enough to identify this
resource in the whole Project Server 2007 environment.

I really cant describe which try led exactly to which exception/error,
because I'm trying this for approximately 4 months now, so here is
what I tried and what I got.

- adding a ProjectResourceRow with the enterprise resource to the
ProjectResource table of the ProjectDataSet together with
QueueUpdateProject method
- using a separate ProjectDataSet with ProjectResourceRow in
ProjectResource table together with QueueAddToProject method
- using same ProjectDataSet together with QueueAddToProject method
- using ProjectTeamDataSet together with QueueUpdateProjectTeam method

I got those exceptions/errors:
- RES_UID invalid
- PROJ_UID invalid
- PROJ_UID does not allow null value
- Resource not found

Sorry, I really cannot tell which try led to which error, most are
SOAP errors, but as a summary of all of this I cannot add an
enterprise resource to a project with my small C# project, like what I
did with Project Prof. 2007 .
All ways using ProjectDataSet, ProjectTeamDataSet, QueueAddToProject,
QueueUpdateProject, QueueUpdateProjectTeam failed completety.

The SDK arrives with a demonstration project called "ProjTool" - but
this project is all but helpful in this case, so when I try to build a
project team there I get this error as a message box: "Error
occured"....that's all. It's no joke, this demonstration project also
cannot build a project team, which seems to be what I have to do to
add enterprise resources to a project.
I just mention it to show that I already peeked into this sample
(since Project Server 2007 Beta 2) to find out how it is done but what
I found is a common error routine which pops up the message box "Error
occured".

Please if anybody knows what I did wrong and has a solution or hint to
solve my problem, adding an enterprise resource to a project, I would
be thankful.

Regards,
Gernot Mulisch
  Reply With Quote


 


2 3rd March 06:02
sharry heberer [msft]
External User
 
Posts: 1
Default PS2007 PSI: Adding an enterprise resource to a project problem



If you are trying to add existing Enterprise Resources to an existing
project, then QueueUpdateProjectTeam is what you want. On the
ProjectTeamRow, you must make sure to set the PROJ_UID (the Guid of the
project), the RES_UID (the Guid of the Enterprise Resource), the NEW_RES_UID
(also equal to the Guid of the Enterprise Resource), and
RES_IS_ENTERPRISE_RESOURCE (set this to true).

Note especially the last 2 fields - it may not be completely obvious that
these 2 fields must be set, but they do need to be set. I hope this
helps....
  Reply With Quote
3 3rd March 06:02
skaarj
External User
 
Posts: 1
Default PS2007 PSI: Adding an enterprise resource to a project problem


Yes it does :-)
I did not set NEW_RES_UID - now my code is working, thank you very
much!

Btw.: just for fun I did not set a value for
RES_IS_ENTERPRISE_RESOURCE and it also worked fine - but of course I
will set this value in my code.


Regards,
Gernot Mulisch
  Reply With Quote
4 3rd March 06:02
sharry heberer [msft]
External User
 
Posts: 1
Default PS2007 PSI: Adding an enterprise resource to a project problem


No problem, glad I could help!
  Reply With Quote


 


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666