Recursive notification listeners


I have 2 listeners; on insert and update on same class.

When an object is created, I have to update “same” record. That kick starts the update operation and notification. In update, I have another update to same record and that starts another notification. And it all gets into an endless loop.

Is there a way around this?

Maybe I am doing it wrong…


@jrattanpal The listener does not fire if you make updates within its callback - so you should have a single listener and the have different code paths with an if(modification) vs if(insertion)