Try Now
More in this section

Forums / Set-up & Installation / Need to add database trigger to event and news module

Need to add database trigger to event and news module

2 posts, 0 answered
  1. Priya Ramesh
    Priya Ramesh avatar
    26 posts
    23 Jul 2009
    06 Aug 2010
    Link to this post
       I want to add a trigger when a news or event is added. I need insert a row in a table when a news item or event is added ( to news and event module). How do I do that? (db trigger ????)

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    09 Aug 2010
    Link to this post
    Hello Priya Ramesh,

    Thank you for using our services.

    You can subscribe to content manager executing event in Global.asax file. This event is fired whenever new content items are created. Consider the sample code bellow:
    void Application_Start(object sender, EventArgs e)
        // Code that runs on application startup
        Telerik.Cms.Engine.ContentManager.Executing += new EventHandler<Telerik.ExecutingEventArgs>(ContentManager_Executing);
    void ContentManager_Executing(object sender, Telerik.ExecutingEventArgs e)
        if (e.CommandName == "CreateContent")
            Telerik.Cms.Engine.IContent contentItem = (Telerik.Cms.Engine.IContent)e.CommandArguments;
            if (contentItem.ProviderName == "News" || contentItem.ProviderName=="Events")
                //perform your logic

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered