When a Content Part is "Saved"

Topics: Core, Troubleshooting
Developer
Jul 2, 2014 at 4:54 PM
When a Content Part is "Saved" (not using the words Updated or Published on purpose)
I need to connect to a Web Service to add additional data to my Content Part

If I use OnUpdated:
It works when the user is interacting with the content item editor, regardless if they Save a Draft or Publish.
But if code is creating the ContentItem via Publish(), OnUpdated does not fire.

If I use OnPublished:
It works when the user or code Publishes the content item.
But it does not work when the user saves a draft.

As a result I'm forced to workaround this issue.
Developer
Jul 2, 2014 at 6:03 PM
There's also OnVersioned and OnCreated that you can use to catch the draft too. Neither of the events will fire if you're just modifying part properties from code directly.
Developer
Jul 3, 2014 at 4:26 AM
Does anything about that seem wrong to you?
Developer
Jul 3, 2014 at 4:40 AM
Or is it that I'm trying to do something in the wrong place altogether?
Developer
Jul 3, 2014 at 9:35 AM
No, what you do seems right. And also I see no issues with the events.
Developer
Aug 10, 2014 at 2:40 PM
https://orchard.codeplex.com/discussions/462161

I just happened to come across this discussion from a year ago and it brought me back to what I was talking about here...