Document Library items delete

Hi ,
I have a Document Library. I created one custom view through code.
in that, i need to show a DELETE option. i already did that.
Question is, only document owners only should have the right to delete those doc's. Others should not delete.
For a list, we have ITEM LEVEL PERMISSION option. Like that , is there any way to achieve  that?
How to do that.?

Hello,
Just create a designer workflow for  your requirement.
Execute that workflow when an new document gets added under library.
The functionality of the workflow is as follows
When a new document get added, you workflow will set contribute access to the owner of that document and will set read access to rest all other users.

Similar Messages

  • SharePoint 2013 : Add annotation to document library item

    Hi all,
    Is there a possibility to add annotation to library items. Example, I am sharing a document library item to a user then the user add an annotation and share to another user.  The other user also should add his/her comments on the item.
    Can anyone help me how to achieve this?
    Many thanks & regards
    Vinay

    We've done this in the past using a Rich Text Field in the metadata of the document.  You can set it up so it Appends new entries to the bottom of the field instead of replacing the existing content.  When a user edits the metadata they see a
    blank field.  When they save it their comments are added to the bottom with their name and a timestamp.  We've used it primarily on issues lists, but it should work on a document also.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Document Library + Items Color

    Hi All,
    Welcome to SharePoint products & Technologies.
    How to Change the color of the Document library items based on the field values? for eg., I have a column called "Status", based on this field values the color of the items should change accordingly.
    Can any one help me out on this issue.
    Let me know if you are not clear or need more information
    Regards,
    SpUser.

    Hi,
    Sorry for the late reply .Could not check the blogs.Here is the script to be put in content editor webpart:-
    <script language="javascript" type="text/javascript">
      var x = document.getElementsByTagName("td") // find all of the TDs
      var i=0;
      for (i=0;i<x.length;i++)
        if (x[i].className=="ms-vb2") //find the TDs styled for lists
          if (x[i].innerHTML=="In Process")
            x[i].parentNode.style.backgroundColor='lightyellow'; // set the color
    if (x[i].innerHTML=="Accepted")
            x[i].parentNode.style.backgroundColor='lightgreen'; // set the color
    if (x[i].innerHTML=="Not Accepted")
            x[i].parentNode.style.backgroundColor='red'; // set the color
    if (x[i].innerHTML=="Need More Info")
            x[i].parentNode.style.backgroundColor='lightblue'; // set the color
      } </script>

  • Sharepoint 2013 / Office 365 Document library item level permissions problem

    Hello,
    I'm looking for a solution to enable users to upload documents to a document library, the ability to view other documents uploaded to the same document library, but able to edit or delete those other documents.
    With a list you can use Item-Level security in Advanced Settings but this is not available for Document libraries. I could use workflows to assign individual permissions to document, but the the library already contains over 2,000 documents and will continue
    to expand so I don't like the idea of having that many individual permissions set.
    Are there any 3rd party plug-ins or solutions to this issue?
    Thanks,

    Try below:
    http://www.hersheytech.com/Blog/SharePoint/tabid/197/entryid/28/Default.aspx
    As it turns out the, setting Item-Level Permissions in a library is fully supported with PowerShell!
    The PowerShell commands for changing this are very simple:
    $web = Get-SPWeb http://YourSite/
    $list = $web.Lists[“Your Document Library Name”]
    $list.ReadSecurity = 2
    $list.Update()
    $web.Dispose()
    Note the 3rd line which is where you determine the value for this setting using the following values:
    1 = “Read all items”
    2 = “Read items that were created by the user”
    If you wish to modify the values for Create and Edit access instead, replace .ReadSecurity with .WriteSecurity with
    the following values:
    1 = “Create and edit All items”
    2 = “Create items and edit items that were created by the user”
    4 = “None”
    For example:
    $web = Get-SPWeb http://YourSite/
    $list = $web.Lists[“Your Document Library Name”]
    $list.WriteSecurity = 2
    $list.Update()
    $web.Dispose()
    Also check 
    http://sppermissions.codeplex.com/
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://freeit-support.com/

  • Not able to create sub folder using SharePoint web service in large SharePoint document library (Item count view threshold limit)

    We are trying to create folder & subfolder in a SharePoint document library using SharePoint default(dws) web service. Document library has unique permission as well as item level permission. It was working as expected. Once item count crosses
    view threshold limit ( 5000) , create folder web method completes with an error and it creates a folder in SharePoint.
    Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
       <soapenv:Header/>
       <soapenv:Body>
          <dws:CreateFolder>
             <!--Optional:-->
             <dws:url>Shared Documents/VenTest02092015v1</dws:url>
          </dws:CreateFolder>
       </soapenv:Body>
    </soapenv:Envelope>
     Response:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
             <CreateFolderResult>&lt;Error ID="2">Failed&lt;/Error></CreateFolderResult>
          </CreateFolderResponse>
       </soap:Body>
    </soap:Envelope>
     While trying to create subfolder under the above created folder service throws an exception saying
    FolderNotFound.
    Though we are able to create subfolder from SharePoint UI successfully. 
    Request
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
       <soapenv:Header/>
       <soapenv:Body>
          <dws:CreateFolder>
             <!--Optional:-->
             <dws:url>Shared Documents/VenTest02092015v1/REQ-1</dws:url>
          </dws:CreateFolder>
       </soapenv:Body>
    </soapenv:Envelope>
    Response:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
             <CreateFolderResult>&lt;Error ID="10">FolderNotFound&lt;/Error></CreateFolderResult>
          </CreateFolderResponse>
       </soap:Body>
    </soap:Envelope>

    Yes, you're probably hitting the 5000 list item threshold (
    http://sharepoint.stackexchange.com/questions/105937/overcoming-5000-file-document-library-limits ). I assume you can do it via the UI because you're probably logged in as an admin in which case, out of memory, the threshold is 20.000 items. You can extend
    this limit, but you probably shouldn't.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • How to set Document Library Item Limit at Site Collection level?

    Hi,
    I have SharePoint which contains one Site collection with many Sites. Each sites has many document library.
    Actually my requirement is, End Users  wants to see only 10 items per page in document library. We can manually set by using "Item Limit" option but i could not set that for around 150 document libraries.
    Is there any possible to set that in Site Collection level?
    Thanks & Regards
    Poomani Sankaran

    You can run for each loop and use below code
    http://get-spscripts.com/
    #Get the site and list
    $web = Get-SPWeb "http://portal/sites/testsite"
    $list = $web.GetList(($web.ServerRelativeUrl.TrimEnd("/") + "/Shared Documents"))
    #Get the list view to be changed
    $newview = $list.Views["Sort by modified date"]
    #Set the mobile and default mobile view properties
    $newview.MobileView = $true
    $newview.MobileDefaultView = $true
    #Update the view configuration
    $newview.Update()
    $web.Dispose()
    $web.Lists[0].Views[0].RowLimit=30
    $web.Lists[0].Views[0].Update()
    How you can get all list using powershell
    http://sharepointrelated.com/2011/11/28/get-all-sharepoint-lists-by-using-powershell/
    If this helped you resolve your issue, please mark it Answered

  • Document library items are not displaying in sorted order in sharepoint 2013

    Hi,
    I have a document library , I am storing document sets on it.
    28326 items are there in the library.
    I have configured sort on Name columns. Initially items are displaying in sorted order like (A,B,C,D,E...)
    Now Items are not displaying in a sorted order it is displaying like (A, B,C,D,E,A,C...) like this.
    Please help me on this sorting issue.
    Thanks,
    Samir

    Are the documents displaying in your image inside the document sets?  If so then your sets (folders) are displaying in alphabetical order and the documents inside the sets are displaying in alphabetical order.  This is what i would expect.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Update document library item where a docx document uploaded using powershell script

    HI
    when i update an existing item of a document library using script i faced the issue.
    i uploaded two .txt files and two word docx files and a png file.
    where i update .txt file item there is no issues , but  for other items i have problem.
    PS C:\Scripts> C:\Scripts\UPdateDocLibrary.ps1
    Exception calling "Update" with "0" argument(s): "There is no file with URL 'Do
    cs/Emc.docx' in this Web."
    At C:\Scripts\UPdateDocLibrary.ps1:26 char:13
    + $item.Update <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException
    Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
    $webURL = "http://tspmcwfe:89"
    $listName = "Docs"
    #Get the SPWeb object and save it to a variable
    $web = Get-SPWeb $webURL
    #Get the SPList object to retrieve the "Demo List"
    $list = $web.Lists[$listName]
    $items = $list.items
    #Go through all items
    foreach($item in $items)
    if($item["NO"] -eq $null)
    $item["Title"] = "My updated edited item!"
    $item.Update()
    adil

    Please check if file is checkout or locked , and if not then checkout it and then try to update -
    $url= $webURL + $item.File.Url;
    $file = $web.GetFile($url);
    if($file.CheckOutType -eq "None" -And $file.LockType -eq "None")
    $file.CheckOut();
    also please try these option, may help -
    1. Allow unsafe update at web
    $web.AllowUnsafeUpdates=$true;
    2. try systemupdate
    $item.SystemUpdate($false)
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Writing modified date of a document library item through CSOM.

    I´m working on an application which is replicating files from one document library to another. Since it is a replication, I want the modified date to be preserved when I copy the file from the source library to the target, so that the user will see the real
    modified date in the target library and not the date of the replication run.
    I access SharePoint through the client side object model and I have been able to set the modified date on a SharePoint 2010 on-premise using the following straght-forward code:
    var listItem = list.GetItemById(id);
    context.Load(listItem);
    context.ExecuteQuery();
    listItem["Modified"] = "03/11/1999";
    listItem.Update();
    context.ExecuteQuery();
    Unfortunately when I execute the same code on any other SharePoint (2013 On-Premise, 2013 Online or 2010 Online) the code will execute without any errors, but the modified date will not be changed at all.
    My actual question is: Is there any possibility to change the modified date throught CSOM on all of these SharePoint-versions?

    I got a work around for this problem..
    Before updating the Modified, Modified By values, First we need to Disable the version settings for document library. Once the fields updated then again we need to enable the version settings. 
    find the updated code below..
                                          //Disable Version settings for DOC LIB
    before update Metadata
                                            _List.EnableVersioning
    = false;
                                            _List.Update();
                                            _cContext.ExecuteQuery();
                                           ListItem item = newFile.ListItemAllFields;
                                           _cContext.Load(item);
                                            //Updating Metadata Created,
    CreatedBy, Modified, Modified By
                                             item["Created"]
    = "8/10/2013 7:04 PM";
                                             item["Author"] = CreatedUserValue;
                                             item["Modified"] = "8/10/2013 7:04 PM";
                                             item["Editor"] = ModifiedUserValue;
                                             item.Update();
                                            _cContext.ExecuteQuery();
                                            //Enable Version settings
    for DOC LIB after update Metadata
                                               _List.EnableVersioning
    = true;
                                              _List.Update();
                                            _cContext.ExecuteQuery();
    Rajendra

  • View (or filter) document library items by Groups

    Hello
    I have a bunch of documents in a library.
    I would like specific groups to see specific documents.
    For example, Group 1 can read Document A and Group 2 can read Document B but Group 1 and 2 should be able to read Document C. Some of the groups can edit, some can read.
    I ended up creating a column with Target Audiences and applied each document with the correct Target Audience (group). 
    Then, I created a view for each of the target audiences.
    That seemed to work ... however, the All Documents view is sitting there. And someone can just click on it and see all the documents. 
    So, I tried to make the All Documents view filter for only Site Owners but that didn't work.
    And, what's to stop someone from searching for Site Contents and finding all the documents there?
    Does anyone have any advice on how I can lock down these files to user groups please?
    Thanks.
    Mel

    Hi
    check this doc
    http://sharepoint-community.net/profiles/blogs/how-to-security-trim-search-results-in-sharepoint-2013
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • The way SharePoint open office documents will differ if the user try to open them from the document library directly, or if users try to open the document from the search result page.

    I have a document library where I have uploaded an excel sheet to it. Now If I click on the excel sheet directly from the document library page , I will get the following error ““The webpage cannot be displayed””. While if I do a search and I open the excel
    sheet from the search result page , it will open the excel sheet using the excel services inside the browser !!.
    So can anyone advice on this ?
    Also if I have a PowerPoint document , and I try to open it from the document library I will get the following error “The webpage cannot be displayed” , and the URL will be prefix with the following “ms-powerpoint:ofv|u|”. while if i do a search and i open
    the PowerPoint from the search result page i will be prompted to either open or save the document ? So why SharePoint is reacting totally different when trying to open document library items from the document library Or from the search result page?

    Hi,
    The behavior in the document library could be probably because of the Documents handling setting. Please try setting it to default behavior (Open in browser) as i hear from you that the default behavior is to open from browser.
    Thanks, Suneetha
    Currently I have set the following;-
    1. On the library advance setting :- I define  “Open in the client application”
    2. On the web application setting:- I define stricked for Browser File Handling
    And I have noted if I delete the browser cache and I access the document , then I will be prompted with the download dialog. but if I re-click on the same document I will be redirected to the
    The webpage cannot be displayed
    And the ms-powerpoint:ofv|u| will be added to the beginning of the URL. So could this be a caching problem ?

  • Adding attachment to SharePoint Document Library- Is it possible?

    I would like to know if it possible to attach a file to a document library items like one would to a List item.
    I have read some postings on this very issue but most are a couple years old.  Would like to know if updated technology has possibly solved
    this issue.  I am using SharePoint 2013 Enterprise edition.
    I am new to SharePoint
    Thank you

    No its not.  The real difference between a list item and a library item is that a library item is required to have one and only one file attachment and that attachment is the focus of the library.  Lists can have multiple file attachments on each
    list item and the focus is the metadata not the attachment.
    Depending on what you are trying to do take a look at Document Sets.  Its a collection of documents that can share metadata.
    http://technet.microsoft.com/en-us/library/ff603637.aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • I was wondering if there is a way to have a registration form be triggered when someone tries to download or access a document library

    I have a document library, where I need to have people register their company  info prior to downloading the document(s).
    I would actually probably like for them to register before they can see or even access the document library items.
    basically I need some type of tracking of the download... I need to have the person fill out a form prior to being able to download the info in the document library
    is there a way to trigger this?
    hopefully their is something simple ....

    Hi,
    According to your post, my understanding is that you wanted to trace the document download in document library.
    In OOB way, we can use the audit log to trace the document download.
    Navigate to Document Library-->Library Settings-->Information management policy settings-->Select the Document Content Type-->Enable auditing checkbox and specify the events downloading.
    Then we can use the audit log to see the counts.             
    http://social.technet.microsoft.com/Forums/en-US/471c8008-aedb-4ae4-bfa0-327c1c3020c8/how-t-track-who-and-when-downloaded-a-doc-in-sharepoint-2010?forum=sharepointadminprevious
    http://www.fivenumber.com/sharepoint-document-counter-counts-the-document-downloads/
    What’s more, we can also use the Google Analytics to achieve it.
    http://spdrummerboy.blogspot.com/2010/05/sharepoint-and-google-analytics.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to call out of box delete function on client side for deleting item in document library SharePoint 2010.

    Hi,
    We want to add the custom functionality to delete the item in document library .
    if we click on custom button it should delete the item in document library.
    Could anyone please suggest me.
    How to accomplish the task.
    Thanks ... 

    Hi,
    Any update?
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Hide the delete menu item from a specific document library

    I want to hide the Delete  item menu option for a specific document library.Since it is for a specific library I would not like to use customcore.js approach.Please suggest some useful javascript for same.
    I have a custom delete action associated with the menu which performs other function as well so need to hide the OOB delete option from the item  menu of a document library.
    I have already used below javascript in CEWP which I added on the document library page itself(allitems.aspx) but yeild no results:
    <script type="text/javascript">
    var elemTable=document.getElementById('ECBItems');
    if (elemTable !=null) {
         var elemTBody=elemTable.childNodes[0];
    //iterate each table row to find the correct ECB menu item to hide(remove)
       for (var iMenuItem=0; iMenuItem < elemTBody.childNodes.length; iMenuItem++) {
             var elemTR=elemTBody.childNodes[iMenuItem];
             var elemTDTitle=elemTR.childNodes[0];
             var title=GetInnerText(elemTDTitle);
     //here we filter on title, but the table contains more information if need be
            if(title =='Delete') {
                 elemTBody.removeChild(elemTR);
    </script>
    Please suggest which can be kept specific and requires no change in masterpage as same masterpage is used across the site.

    Hi justSP,
    Greetings.
    Hope the below links help you
    http://social.technet.microsoft.com/Forums/office/en-US/9adea3a2-6d08-4c04-ace2-88a704833f1d/how-to-hide-delete-item-from-ecb-menu-for-1-specific-custom-list?forum=sharepointcustomizationlegacy
    http://chakkaradeep.com/index.php/sharepoint-hiding-menu-items-from-the-edit-control-block/
    http://social.technet.microsoft.com/Forums/office/en-US/1b832635-4ae7-4f31-826c-2d6b834ece52/hide-delete-from-ecb-menu-for-a-specific-document-library-in-sharepoint-2010?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/office/en-US/919e01e6-9a7a-4439-b778-28e0dc8bffba/how-to-hide-delete-option-from-ecb-menu-in-document-library-in-sharepoint-2010?forum=sharepointdevelopmentprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

Maybe you are looking for

  • Unable to download iOS 4.3 update

    I have been trying for over a week to download the iOS 4.3 update for my iPhone 4 and keep getting the same error -3256 saying the network connection was lost. The firewall on my Mac is off and my iTunes is the latest version but it keeps giving me t

  • Abnormally Log switches

    Dear all, In my oltp system,the redo size for per member is 20m,and the average log switch is in 10-15 mints.But today i saw a disturbing information in my alert_log...... Thread 1 advanced to log sequence 221335 Current log# 1 seq# 221335 mem# 0: O:

  • Best mouse  pad for magic mouse ?

    I used a thick sponge-ish non slip mouse pad with a cloth-like covering for my MS mouse on my pc. Now with the imac and magic mouse, this pad seems not quite right. The tracking is a little strange acting. Would a more plastic coated mouse pad surfac

  • Verbose Mode Always On

    I just got my 15 inch Powerbook G4 1.67 GHz (running OS X 10.4.6, Tiger) back from the factory. They had to repair the lower memory slot because it was failing to recognize the memory in the lower slot (hence the name, haha). My computer seems to con

  • Facetime dropping calls

    Hey guys anyone else today been having trouble with facetime dropping there calls wfter a short period of time. Im using a ipad 2 and my husband is using an ipod 5th gen please help