Created
July 30, 2013 20:56
-
-
Save alexshyba/6116855 to your computer and use it in GitHub Desktop.
Subscribing to item:saved where you can access item changes and do lots of efficient exclusion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event.Subscribe("item:saved", this.Item_Saved); | |
private void Item_Saved([NotNull] object sender, [NotNull] EventArgs e) | |
{ | |
var changes = Event.ExtractParameter<ItemChanges>(e, 1); | |
if (!changes.IsFieldModified(FieldIDs.Security) && !changes.IsFieldModified(FieldIDs.Workflow) && | |
!changes.IsFieldModified(FieldIDs.WorkflowState)) | |
{ | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment