locked
Deleting subsites with Records Library RRS feed

  • Question

  • Hi,

       We have In Place Records Management enabled in our Team Sites. So in any Document Library or Records Library, where we have document(s) declared as record "Delete this Library" menu is disabled. I believe this is by design and we have no issues with this.

      However we are able to delete the subsites or site collections with Records Library. Ideally (atleast for our situation) this should not be the case. If we can't delete a document library with a record, we shouldn't be able to delete sites also with Records.

    Abilitiy to delete the sub site or site collection with records library or document library with Records is an expected behaviour? Is there any way we can prevent from deletion?

     Regards,

    SPLearningNeverEnds

    Tuesday, November 10, 2015 5:52 AM

Answers

  • Hi there,

    i guess this is by the design of the SharePoint, but what you can do 

    there is a good article you can follow to do delete the list with records 

    http://www.sharepointanalysthq.com/2011/01/deleting-a-records-center-or-records-library-in-sharepoint-2010/

    but in this article there is a point where you need to go a un-declare each document manually, you can do this step using PowerShell script or you select several items as records simultaneously, select the check boxes next to multiple items, and go to Ribbon and un-declare:

    $SPAssignment = Start-SPAssignment
    $web = Get-SPWeb "http://<site>" -AssignmentCollection $spAssignment
    $list = $web.lists["ListName"].items
    foreach ($item in $list)
    {
    $IsRecord = [Microsoft.Office.RecordsManagement.RecordsRepository.Records]::IsRecord($Item)
    if ($IsRecord -eq $true){
    Write-Host "Undeclared $($item.Title)"
    [Microsoft.Office.RecordsManagement.RecordsRepository.Records]::UndeclareItemAsRecord($Item)
    }
    }
    Stop-SPAssignment $SPAssignment

    BUT

    if you want to prevent your site from being deleted 

    you can follow the below post and keep your settings in your document center the same 

    http://blogs.technet.com/b/sharepointdevelopersupport/archive/2012/09/07/how-to-prevent-site-deletion-with-a-custom-event-receiver.aspx

    Thanks

    Please "Mark As an Answer" if this reply resolves your query, If helpful then "Vote Helpful" 


    Tuesday, November 10, 2015 7:40 AM