Sitecore Element: Created Against Element: Added

What is the difference between item:created vs item:added events? When does each event occur?

+6
source share
2 answers

Looking at the Sitecore.Data.Events.ItemAddedDelegate code, you can read that this delegate is deprecated and you should use ItemCreatedDelegate instead. From my tests:

  • Creating a new element - both the element: added, and the element: are created
  • Cloning element - both the element: added and the element: are created
  • Duplicate element - element: added NOT executed, only element: executed

     namespace Sitecore.Data.Events { [Obsolete("Use the ItemCreatedDelegate event instead.")] public delegate void ItemAddedDelegate(object sender, ItemAddedEventArgs args); } 

In general, always use the: created element

+10
source

Element: added and element: created events look similar, but only Sitecore fires item: is added when the user creates the element through the user interface, but it fire fire item: is created when the code creates the elements through the API. use item: added if you only need to catch add-ons to hand items.

Link: taken from John West's post

http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2011/05/all-about-events-in-the-sitecore-aspnet-cms

+3
source

All Articles