List item stuck in "Pending"

Posted by Norgean on Geeks with Blogs See other posts from Geeks with Blogs or by Norgean
Published on Thu, 15 Mar 2012 14:06:07 GMT Indexed on 2012/03/18 17:59 UTC
Read the original article Hit count: 198

Filed under:

Problem simplified:

On approval, you have an event receiver that changes a field according to some weird and wonderful business logic. But the item remains in "Pending" state. Why?

 

First, you obviously need to turn off the event handling when you change things in the event receiver. If not, the event receiver will be called because the item changed. Infinite recursion is a bad thing. But you guessed that.

 

But that's not what was wrong. The culprit in my case was that items are set to require a new approval whenever the item is changed. This is good, but not what we want in this particular case. So force it back to approved after the other column has been changed.

© Geeks with Blogs or respective owner