1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Execute logic on documents creation?

Execute logic on documents creation?

4 posts, 0 answered
  1. Basem
    Basem avatar
    131 posts
    Registered:
    22 Dec 2010
    25 May 2011
    Link to this post
    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? 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    26 May 2011
    Link to this post
    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
  3. Conrad Ehinger
    Conrad Ehinger avatar
    59 posts
    Registered:
    22 Sep 2009
    25 Jul 2011
    Link to this post
    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
  4. Basem
    Basem avatar
    131 posts
    Registered:
    22 Dec 2010
    04 Aug 2011
    Link to this post
    @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.
4 posts, 0 answered