Hot answers tagged

19

Have you tried using the "recycle" command using the REST API? (not using HTTP DELETE) Endpoint URI structure: http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/recycle() Please refer to the documentation regarding recycle on MSDN: http://msdn.microsoft.com/en-us/library/jj247053.aspx


14

The link is hidden, and you'd have to type (copy paste it) to reach the delete site option. Navigate to _layouts/15/deleteweb.aspx in the site you want to delete (as owner). In your case it would be https://<domain>.sharepoint.com/sites/RobTest/_layouts/15/deleteweb.aspx


10

I took a stab at converting Servy's answer into PowerShell. Seems to work for me, but would be interested in any feedback. [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") [System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, ...


10

Deleted subsites not going in Recycle Bin They are there, but You should find them with this path: http://server/_layouts/15/AdminRecycleBin.aspx?View=2 ...or view=13 for he case of SharePoint Online


10

It's a normal behavior with the recurrence events when you try to edit a specific one event in the Event series ! So you should be aware of the following : If the file attached for a specific event level . you can get the delete link for only the related files that attached directly for this event when editing this specific event. If the file attached for ...


8

This was the same issue with me. The Central Administration displayed the site in the sites list, but without any reference to the Content Database where it should have been created. No way to remove it using the web interface (all pages displaying information about the site had no content at all). Then i thought to clean it up and remove via script. A ...


7

I've found a post on msdn that explains the request limits on the bottom of the page. http://msdn.microsoft.com/en-us/library/office/jj163082.aspx SharePoint has a 2 MB limit for an operations request, and a 50 MB limit for the size of a submitted binary object. The request size is limited to protect the server from excessively long queues of ...


7

First try this set of commands: $web = Get-SPWeb http://web-url $list = $web.Lists["Documents"] $list.AllowDeletion = $True $list.Update() and then $web = Get-SPWeb http://web-url $custom = $web.lists["Documents"] $custom.Delete()


6

This seems to be an issue with the powersheel_ise.exe and once I close and reopen it, it seems to be fine. Here's a link I found.


6

I recently ran into the exact same issue in SP 2013 where my Dev machine had the RTM install and the target server the June CU. We ended up copying the Content Database from SQL directly, reattaching and associating it to a Web Application and it worked flawlessly. It seems the Restore command is no longer backwards compatible and can't be relied to restore ...


6

To list them, this actually gives you all sites under the path though: Get-SPSite "http://awesome.com/workspaces*" -Limit ALL To delete you should be able to use Get-SPSite "http://awesome.com/workspaces*" -Limit ALL | Remove-SPSite -Confirm:$false You can use Remove-SPContentDatabase -Identity {GUID} to remove a content database


5

If I am not wrong, I think $listItems[$x].Recycle() deletes the list item and puts it in the recycle bin whereas $listItems[$x].Delete() deletes the item permanently. Moreover, I think you should use Batch Delete i.e. SPWeb.ProcessBatchData() to make deletion faster. This example shows how you can do batch deletion in a list/library: http://sharepointnadeem....


5

So let's go with your first request. You want a piece of code to run when a list item is deleted from a list but it has to be 100% javascript and there can't be any page postbacks. Obviously we must assume the page is going to stay open the entire time. You are left with using web services or CSOM to achieve this. My recommendation would be to use ...


5

When you create a new web application, the content database associated with it is fresh in the sense that you haven't added any data to it yet. The purpose of upgrading from SP 2010 to SP 2013 is to carry over the content from SP 2010 to SP 2013. So you delete the original content database as you don't need it and attach the content database from SP 2010 to ...


5

A WebDeleting event can be used to prevent users event if they are owners to delete a site collection. Example: public override void WebDeleting(SPWebEventProperties properties) { properties.Status = SPEventReceiverStatus.CancelWithError; properties.ErrorMessage = "This site cannot be deleted."; properties.Cancel = true; } See this for more ...


5

If you examine the item using PowerShell you can get a better idea of what is going on. In all the cases where I have seen it the lock expires after short period(20 minutes) and has been caused by word setting a lock when a user has selected to edit the file: $web = Get-SpWeb http://somesite.net $item = $web.GetListItem("/relative/url/to/item.doc") $item....


5

The content type was added to the available content types for your Pages Library. Go to Pages > Library ribbon > Library settings > Content types section. Click on the content type name there and then delete. That will remove it from the Pages library. Then you can go into Site Settings > Content Types and delete it there.


5

I'll just expand on Allen Bai's answer - he's right. If you are unfamiliar with how to 'create a custom permission based on Contribute' then reference this link on Microsoft's website. You need to create a custom group, name it 'Contribute not delete', so that you and others will know what this group is for. As you see in the picture below, the user group ...


4

The limit of items to be accessed in one call by the Client Object Model is defined by the SPWebApplication.ClientCallableSettings.MaxObjectPaths property. This applies to Add, Delete and Update operations too. http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.clientcallablesettings.aspx http://msdn.microsoft.com/...


4

Here is an example in C# var web = SPContext.Current.Web; var links = web.Lists.TryGetList("Links"); if (links != null) { links.AllowDeletion = true; links.Update(); web.Lists.Delete(links.ID); web.Update(); } See why to use web.Lists.Delete()


4

If you are facing this error while deleting empty folder "The file is currently checked out or locked for editing by another user.", Then it might be because of there are documents in the library that don't have a major version published. Yo can go into the Library Settings and take ownership of the files. Then delete the entries, and the folder can be ...


4

First thing, you make sure you are recording the Deletion in your audit log. you can check here Configure audit settings for a site collection Now following events available for audit log reports The following events are available for audit log reports to help you determine who is taking what actions with the content of a site collection: Opened and ...


4

Maybe you have deleted the site before, and it's lurking around in a dark place? Try this and see what you get... Get-SPDeletedSite & Remove-SPDeletedSite You may already have restored this site before. In that process you also deleted the site first (automatically), which you can find running the command... >Get-SPDeletedSite You'll see the site (...


4

You can add these lines of CSS using a content editor webpart to hide the delete button. /* For Dispform.aspx */ a[id="Ribbon.ListForm.Display.Manage.DeleteItem-Medium"] { display:none; } /* For Editform.aspx */ a[id="Ribbon.ListForm.Edit.Actions.DeleteItem-Large"] { display:none; }


4

Are you able to use a 2010 workflow in your environment? I ran into this issue a while back, and found that for some reason a 2010 workflow sends it to the recycle bin, but a 2013 permanently deletes it!


4

This behavior mirrors NTFS ACLs. A move operation is a Create+Delete operation. If you need the ability for files to be moved, you must grant Delete.


4

Try to start from i=listItems.Count-1 to avoid looping on items that already deleted! for(int i=listItems.Count-1 ; i >= 0 ; i--) { SPListItem currentListItem = ListName.Items[i]; currentListItem .Delete(); } or for(int i=listItems.Count-1 ; i >= 0 ; i--) { SPListItem currentListItem = listItems.GetItemById(...


3

I tested a number of different options I found online including an attempt to do concurrent background processing as well as batch requests and the following worked best for me. I did not want to delete the list itself. Param( $listname, $url=$env:SPSITE #an env variable set at system level ) Add-PSSnapin Microsoft.SharePoint.PowerShell Start-...


3

I have figured it out. The answer is below in case anyone else runs into the issue: I looked at the logs for the error and found this: System.ArgumentException: Column 'PC1Rerou' does not exist. It may have been deleted by another user. If you delete a workflow and re-add it you need to run the workflow manually after you restore it in order to ...


Only top voted, non community-wiki answers of a minimum length are eligible