How to assign project owner form code ?

D

Daniel Lee

Hello :

I need to develop project web application as below requirement.
1. The web application could create a new project by specific project
template.
I complete the job by PDS function as below.

<Request>
<ProjectCreate>
<AutoPublish></AutoPublish>
<Project>
<ProjectName></ProjectName>
<StartDate></StartDate>
<TemplateID></TemplateID>
<TemplateName></TemplateName>
-- Other project details --
</Project>
</ProjectCreate>
</Request>
Now my problem is that the ProjectCreate method will copy project template
owner as the new created project owner. I would like to change the new
project owner from code as soon as the new project was created by template.
How could i do it?
This moment I only could change the project owner from PWA administration
function.
I found one asp program of PWA as below:
"http://localhost/ProjectServer/Views/ProjectDetailsView.asp"

execute the project owner change function but I could not figure out how to
change the project owner from code.
Any comment will be very appreciated.

Best Regards,
Daniel Lee
 
R

Ray McCoppin

have done this by changing the owner after creating the project like this:
using PDS calls

Check out the project
like this

<Request>
<ProjectCodeValues>
<ProjectID>5677</ProjectID>
<AutoCheckout>1</AutoCheckout>
</ProjectCodeValues>
</Request>

change the owner field:
notice that column UID of 99999 is Owner and the ValueUID is the res_euid of
the new owner from the database.

<Request>
<ProjectCodeValuesUpdate>
<ProjectID>524</ProjectID>
<AutoCheckin>1</AutoCheckin>
<Columns>
<Column>
<UID>99999</UID>
<ValueUID>106</ValueUID>
</Column>
</Columns>
</ProjectCodeValuesUpdate>
</Request>


Check the project back in...
 
D

Daniel Lee

Hello Ray:

How could I get res_uid? If I would like to assign one project
server account "David" to be the project owner how about the procedure?
Is it like this?
1. Check In project
2. GetUser List and got below
<PSUser>
<PSUserName>David</PSUserName>
<PSUserIsNT>0</PSUserIsNT>
<PSUserNTAccount>
</PSUserNTAccount>
<PSUserADGUID />
<PSUserEmail>[email protected]</PSUserEmail>
<PSUserPhonetic>
</PSUserPhonetic>
</PSUser>
but I can not find res_uid here. If I could get res_uid therefore record
the res_uid.

3. Create project by specific template and got the return projectID.

4. Change the owner as your suggestion.

Is above procedure correct?

Regards,
Daniel
 
B

Bruce McF

Hey Ray,

Is there a way to GET the owner or status manager through VBA for Project
Server 2007?

Thanks!
Bruce
 

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