I have added a Custom Field named "MyImage" to Events Module.
I need to retrieve it from code behind. How can I do that? My RelatedMedia field is basically an Image that i want to retrieve for an Event.
I was hoping something like this would work, but it doesn't:
var mgr = EventsManager.GetManager();
Event ev = mgr.GetEvents().Where(e => e.UrlName == urlName).FirstOrDefault();
var photo = obj.GetValue("MyImage");
MyImage is a custom field of type RelatedMedia (Image) added in the Events module through the Events Content page(Right hand menu).
Kindly help, I am stuck with this for hours.