Updating ‘ModerationStatus’ field

You might have experienced a road block when trying to the update the ‘ModerationStatus’ field with other fields. Any attempt to do so will result in an exception “You cannot change moderation status and set other item properties at that same time”. This is an expected behavior since the document deals with stream, promotion and demotion and for non document libraries we are not touching the streams, so it allows updating other fields with “ModerationStatus”.

Here is the code: In this sample code, we are trying to update the ‘Editor’ field along with the ‘ModerationStatus’.