I'm trying to move a Dynamic Content item to the Recycle Bin in SF 7.1.5200.0, and the app is throwing an exception stating "You are not allowed to move this item into the Recycle Bin" on the call to MoveToRecycleBin() . Here is the code I'm using.
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager(String.Empty);
Type moduleType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Vendors.Vendor");
dynamicModuleManager.Provider.SuppressSecurityChecks = true;
// Update a vendor record
var vendor = dynamicModuleManager.GetDataItem(moduleType, masterId);
catch (Exception ex)
This problem occurs when a front-end user tries to execute this code. I can move this same Dynamic item to the Recycle Bin in the back-end with no issues. This Dynamic object has Related Items and Related Media type fields in it. Any insight into the error message. Is it a permissions issue?
Also, when I'm querying Dynamic Content items should I filter by the Visible or the IsDeleted property to exclude items in the Recycle Bin?