How to fetch value from Enterprise custom field and Adding a link inProject workspace

U

Unnic

Hi,

I am facing the following issues in Project Server 2007. Is there any
programming (using SDK) / Project Server 2007 support for these?

1) I have added a enterprise custom field called WorkOrder specific to
project. I have used this field as mandatory one while adding a new
activity (project). Now I want to retrieve the value from the custom
field and pass it as a query string in a link for e.g.
http://www.msdn.com?WorkOrder=@WorkOrder.

2) I want to add custom link, like the above one (by taking the custom
field value i.e., work order) during new project creation so that
these links will be displayed in the project workspace.

Unnikris
 
J

Jackson T. Cole

Look at the part of the sceen above these posts, right under "Discussions
in Microsoft Project Server". The box on the right labeled "In:" has a
selection list button. Click on it, and the answer is obvious! :>)

JTC
 
P

Paul Conroy

Two easy options

Manually

Add the "Hyperlink Address" column to a Gantt View. Add your URL to the
project summary row.

Add the Hyperlink Address Field to your Project Centre View.

Automated

Run a macro which constructs and saves the URL into the Hyperlink Address
field on the Project Summary Task.

Add the Hyperlink Address Field to your Project Centre View.

HTH

Paul
 
U

Unnic

Hi Paul,

Can you please provide details of macro any reference to SDK

Thanks
Unnikris
 
P

Paul Conroy

Paste this macro into the Before Save event in your Ent.Global Template

line starting myaddress and finishing "customfieldname")) should be on one
line
also change the customfieldname to whatever is applicable in your environment


Dim myaddress As String

myaddress = "www.myurl.com"

myaddress = myaddress &
ActiveProject.ProjectSummaryTask.GetField(FieldNameToFieldConstant("customfieldname"))

ActiveProject.ProjectSummaryTask.Hyperlink = myaddress
 
U

Unnic

Thanks a lot Paul.

I am new to MS Project Server. Will appreciate if you can elaborate
'Paste this macro into the Before Save event in your Ent.Global
Template'.

We have installed MS Project Professional and set connection to the
project server. When we click 'Configure Project Professional' button
under Enterprise global, we are getting Project Professional opened.
Should I put this macro in Project Professional? If yes where? Can you
please explain more.

Thanks in adance.

Unnikris
 
P

Paul Conroy

Open Enterprise Global from Server Settings in PWA.
Open the VB editor by pressing ALT-F11
Expand VBAProject (Global(+non-cached Enterprise) in the project explorer
window and double click on ThisProject (Global(+non-cached Enterprise)
The code window will appear which will be blank
from the drop down menu at the top left, it should display "General", select
Project
from the right hand drop down, select BeforeSave
Paste the code between Private Sub and End Sub

Save the Project Template.

You need to restart Project Pro in order for any changes to take effect.

In order to allow macros to run on the client you will have to reduce your
macro security level to medium.
 
U

Unnic

Hi Paul,

Thanks for your reply.

We have tried the steps mentioned in your reply, but, the link is not
coming in the project home page. Any idea how to debug this? Any
trace/log file based debugging available?

When we did line by line debugging it was found that ActiveProject was
referring to the project opened in Office 2007 Professional. In fact
it has to refer to the project in Project server.

Are we missing anything?

Regards
Unnikris
 
Top