Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a difference between DeleteObject() and Recycle() methods for SP.Folder

Could anybody help me to understand a difference between DeleteObject() and Recycle() methods for SP.Folder?

I found this documentation, but it's not clear for me.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.recycle.aspx

like image 748
Warlock Avatar asked Nov 18 '12 11:11

Warlock


2 Answers

Delete()

delete permanently without using the recycle bin.

to move item to recycle bin use

Recycle();

http://nickgrattan.wordpress.com/2007/10/09/spfolder-splist-deleting-versus-recycling/

like image 157
Mahmoud Farahat Avatar answered Sep 20 '22 17:09

Mahmoud Farahat


SharePoint maintains a recycle bin like a windows OS, that we can use it through our code for temporary deletion. I used Recycle() in one of our project. When we use Delete() or DeleteObject() it deletes the item directly without putting them in recycle bin but if you use Recycle() method it will send the item in recycle bin.

Shiv Tomar

[email protected]

http://www.tekritisoftware.com/brochure/Microsoft-Sharepoint-Development

like image 41
user1646209 Avatar answered Sep 21 '22 17:09

user1646209