I've implemented IAlertUpdateHandler
interface in a class and used it for handling creation and updating of alerts. The code is fired but it goes into endless loop by calling itself again and again.
Actually I want to suppress email notification so I'm calling a.Update(false);
but this again calls PreUpdate
or PostUpdate
method and there is
StackOverFlowException
:(
I've tried returning true/false from both the methods but nothing is helping.
According to the documentation, you're supposed to just return true or false. Try commenting out the Update call and just return either true or false. If you call Update, you'll just go into the recursive loop and your return statement will never get evaluated.