Exporting event data on publish

Posted by Community Admin on 04-Aug-2018 02:08

Exporting event data on publish

All Replies

Posted by Community Admin on 19-Mar-2012 00:00

Hi,

I'm not sure how to achieve what I'm trying to, but I'm attempting to get Sitefinity to send data to an external CRM whenever an event is created (the data will be exported, we think, as a JSON array). The export should happen as a default action as part of the publication process. My question is if this is possible using the Event API or if a custom event module would be the better approach?

Cheers,
Phil.

Posted by Community Admin on 21-Mar-2012 00:00

Hello Phil,

 You can hook up to the EventsManager events in Global.asax as well, please see the below example for PageManager, the implementation should be identical:

protected void Application_Start(object sender, EventArgs e)
    PageManager.Executing += new EventHandler<Telerik.Sitefinity.Data.ExecutingEventArgs>(PageManager_Executing);
    PageManager.Executed += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(PageManager_Executed);
   
   
private void PageManager_Executing(object sender, Telerik.Sitefinity.Data.ExecutingEventArgs e)
    var cn = e.CommandName;
    var ca = e.CommandArguments;
   
private void PageManager_Executed(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
    var cn = e.CommandName;
    var ca = e.CommandArguments;
      
However please note that some of the events might be executing more than once.
alternatively you can create a custom provider for pages inheriting form the default one - Telerik.Sitefinity.Modules.Pages.Data.OpenAccessEventProvider and override its methods like CreatePageNode, MovePageNode etc.

There is a configuration section Sitefinity/Administration/Settings/Advanced >> Pages >> Providers that will allow you to register your custom OA provider or replace the type of the default one which is shown as a node of Providers.

All the best,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 25-Mar-2012 00:00

as per your sugestion if the event executed many times ("CreateEvent" in events list)

"alternatively you can create a custom provider for pages inheriting form the default one - Telerik.Sitefinity.Modules.Pages.Data.OpenAccessEventProvider and override its methods like CreatePageNode, MovePageNode etc. "

Is there another way to send an email when new event created (without implementing OpenAccessEventProvider) ?

Thanks,
Romany

Posted by Community Admin on 26-Mar-2012 00:00

Hello,

Override the data provider and the methods you need which is several rows of code because you are only going to send an email and not changing the base logic

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed