05 Jan 2012
05 Apr 2013
Link to this post
I just had an instance where I have a custom module widget on a page that contains documents. One of those documents had been deleted in the backend and the widget was throwing an error while opening the page...
my code is like so...
var contentlinks = cdeapportionmentItem.GetValue("Attachment");
foreach (ContentLink cl in contentlinks as ContentLink)
var document = libraryManager.GetDocument(cl.ChildItemId);
Basically the custom module had the contentlink still in it, but there was no document to get based on the childitemid. and while getting the document, my logic threw an error.
Is there no way to prevent documents from being deleted if they are residing in custom modules?