How to cancel delete assignment requests?

  • Thread starter Melih Öztürk
  • Start date
M

Melih Öztürk

Hi to all,

When a WBS is approved by PMO, resources can't make any changes to this WBS.
The most importang change in Project Server
is deleting a task which is assigned to a resource by resource. Since I
can't handle this permission through 'Team Members'
groups global or category permission, the best way is to write an Event
Receiver.

I wrote a class which inherits from StatusingEventReceiver and override the
OnAssignmentDeleting method. Method contains only

e.CancelReason = "SampleReason";
e.Cancel = true;
base.OnAssignmentDeleting(contextInfo, e);

lines. When a resource tries to delete an assignment, Project Server shows
the event receiver cancellation message and ULS logs
shows the cancellation and its reason. But the problem is, assignment still
shown as strikethrough and resource can send it
to PM. When PM opens the project, he sees the delete request and he can
approve it. When it got published, everyone can see it.
So it is obvious that cancel operation does nothing but showing a
cancellation message.

My problem is, how can I make it possible to cancel assignment delete
requests in every situation. Is the code I wrote does
something wrong or is it not possible to do it with Project Server?

PS: Also Project Server throws

System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: ProjectServerError(s)
LastError=GeneralActionCanceledByEventHandler Instructions: Pass this into
PSClientError constructor to access all error information at
Microsoft.Office.Project.Server.WebService.Statusing.UpdateStatus(String
changexml) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String
serviceName, String methodName, Object[] parameters)

error.
 
M

Melih Öztürk

The problem in the PS section that I mention is a proxy problem. I simply
wrote the simple code that I mentioned in question and got error also. I
handled the SoapException also, but nothing changes.
 

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