Execute logic on documents creation?

Posted by Community Admin on 04-Aug-2018 23:10

Execute logic on documents creation?

All Replies

Posted by Community Admin on 25-May-2011 00:00

I want to send an email alert when documents are uploaded. Is there a way to trigger logic once a new document is created?

In Sitefinity 3, there is a sample to do this with pages: http://www.sitefinitywatch.com/blog/09-06-12/Email_Notification_when_Sitefinity_Pages_are_Changed.aspx . How can you do something similar in Sitefinty 4.1? 

Posted by Community Admin on 26-May-2011 00:00

Hi Basem,

In 4.0 you can use workflow to send an email. You can configure the workflow from Sitefinity >> Administration >> Workflow. We use Windows Workflow Foundation and there are the XAML files that you can modify in Visual Studio or another XML editor. The base XAML files are attached.

Another option is overriding OpenAccessLibrariesProvider and its CreateImage/CreateDocument method which is triggered when you upload a new image/document.

Greetings,
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

Posted by Community Admin on 25-Jul-2011 00:00

Basem,

Were you able to get this working? I'm working on a control that needs the same functionality but I am having a hard time finding an event to hook to. This workflow option seems promising but I'm not sure where in the XAML file I need to add my logic..

Thanks,

Chris

Posted by Community Admin on 04-Aug-2011 00:00

@Conrad, it didn't seem we had the control we needed going the Workflow route. So we ended up inheriting the OpenAccessLibrariesProvider class and overriding ExecuteOnPublic method. I hope this helps.

This thread is closed