New answers tagged event-handlers
You can write an event receiver for document library and check on itemupdated or updating event if the publishing state has been changed. You can use the ModerationInformation to see if it is in a published version or not. Approved is published. If you don't have approval, you can go for "Level", where 1 is published and 2 is unpublished. Example: ...
Use properties.AfterProperties["Age"] = "Your Value"; See Set custom field value in ItemAdding event for more information.
Top 50 recent answers are included