Accessing Dynamic Content Item when hooking into IDynamicContentUpdated Event
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;
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