LeonZandman
LeonZandman

Reputation: 3064

What does IAlertNotifyHandler's OnNotification() return value do?

BY now I've created a number of custom alert handlers for SharePoint 2007 using the IAlertNotifyHandler interface. Using this interface you have to implement a method called OnNotification(), which has the following signature:

bool OnNotification (SPAlertHandlerParams ahp);

As you can see this method should return a boolean value. The official MSDN docs list the following explanation of this return value:

true if Windows SharePoint Services marks the notification as processed; otherwise false

At first I thought this meant that if you return true you signal SharePoint that your handler has done all alert processing and SharePoint shouldn't execute its default behaviour. However, in practice there doesn't seem to be any difference in the way the alerts are handled. You can return true or false, it doesn't make any difference.

I then used Reflector to dissassemble the source code, but unfortunately the code that processes OnNotification's return value isn't managed, but native.

So who knows what that return value means?

Upvotes: 1

Views: 1437

Answers (1)

glenc
glenc

Reputation: 284

I believe this is only considered in the case of Digest alerts (Daily or Weekly summaries) and not for Immediate alerts. If you return false when handling a summary alert, the same items will be sent to the user in the next summary alert.

Upvotes: 1

Related Questions