Need Help With Setting The Value Of An Object Property Thru a DocumentUpdatingEvent

You should not use xwiki.getDocument. You can get the previous XWikiDocument using docSource.originalDocument.

Note that if you are only listening to DocumentUpdatingEvent you won’t be called for new document (just making sure you are aware of it :slight_smile: ).

What do you mean by “fail” exactly ? You get some error ?

I don’t really understand what is the link between the first extract and “The Entire Code” since can’t find it in it.