0
votes

I've created a new event handler in my code that looks like this

namespace Utilities
{
    public class CustomEvent
    {
        public void NewEvent_CreateItem(object sender, EventArgs args)
        {
            //Implementation here
        }
    }
}

I've add the following to my sitecore.config file

<event name="item:added">
    <handler type="Sitecore.Data.Fields.ItemEventHandler, Sitecore.Kernel" method="OnItemAdded" />
    <handler type="Utilities.CustomEvent, Utilities" method="NewEvent_CreateItem"/>
    <handler type="Sitecore.Caching.Placeholders.PlaceholderCacheEventHandler, Sitecore.Kernel" method="UpdateCaches" resolve="true" />
</event>

However I get the following on my sitecore site:

Could not resolve type name: Utilities.CustomEvent, Utilities (method: Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).

Any ideas?

Thanks

Gemma

1

1 Answers

1
votes

I was referring to the the full namespace instead of the project that builds as a dll

so I had

<handler type="Business.Utilities.CustomEvent, Business.Utilities"
method="AcceptClone_SavedItem"/>

instead of

 <handler type="Business.Utilities.CustomEvent, Business"
 method="AcceptClone_SavedItem"/>