Project Server 2007 Resource Changed Event fires recursively

K

K S

I have Project Server 2007 Server Side Event for Resource Changed. I am
populating few custom fields based on the security of the resource and then
updating the resource using UpdateResources function.

When the code execution hits UpdateResources function, the server side event
fires itself again. It fails during second time as I already have the
resource checked out before I call UpdateResources.

So, I want to ensure that I can update the resource without causing the
event to fire again.

Please advise.
 
S

Stephen Sanderlin

There's no way to prevent recursive loops like this -- you just have to
code around them.

I think that an easy solution would be to call ReadResource() to check
and see if the resource is already checked out. Since the event handler
runs in the context of the SSP Admin, if that user has the resource
checked out then you can just skip your handler's code and exit cleanly.

--
Stephen Sanderlin
Principal Consultant
MSProjectExperts

For Project Server Consulting: http://www.msprojectexperts.com
For Project Server Training: http://www.projectservertraining.com

Read my blog at: http://www.projectserverhelp.com
Join the community at: http://forums.epmfaq.com
 

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