Accessing Dynamic Content Item when hooking into IDynamicCon

Posted by Community Admin on 04-Aug-2018 15:43

Accessing Dynamic Content Item when hooking into IDynamicContentUpdated Event

All Replies

Posted by Community Admin on 06-Oct-2014 00:00

I am following the instructions found Here to hook into the Event fired when a Dynamic Content item is updated.  However, it appears the documentation is out of date?  I am trying to access the actual content item that was updated, but eventInfo.Item throws an error....  actually everything but eventInfo.UserId throws an error.  How can I access the actual content item that was published...  and how do I only execute my code when the Live version is publishe?

private void IDynamicContentUpdatedEvent(IDynamicContentUpdatedEvent eventInfo)
        
            var userId = eventInfo.UserId;
            var modificationDate = eventInfo.ModificationDate;
            var dynamicContentItem = eventInfo.Item;
            var visible = eventInfo.Visible;
        

Posted by Community Admin on 09-Oct-2014 00:00

Hello Michael,

I have just tested the behavior on my side on a test Sitefinity 7.2 project and the IDynamicContentUpdatedEvent was fired when a dynamic content items is being updated. The UserID was also successfully retrieved from the eventInfo. I have also recorded a short video for your reference demonstrating the behavior on my side.

Can you please let me know what is the exact error thrown when you get the UserId? In addition to this, can you please specify what is your current Sitefinity version where the issue is reproduced?

Regards,
Sabrie Nedzhip
Telerik

 
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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed