Thursday, September 16, 2010

Disabling the Upload Button on a Document library

I have a document library that houses InfoPath forms. When a new form is submitted, a series of workflows are triggered and tasks assigned, etc. I had an issue where workflows were getting started multiple times, creating multiple tasks, and generally causing chaos.

I traced the issue to the fact that users were not only using the "New Document" button to create a form, but were also saving old forms and re uploading them using the "Upload" button; resulting in duplicate files, duplicate workflows, etc.

I resolved the issue by simply removing the Upload button from each page that linked to the document library. Here are the steps to do this:

1) Use SharePoint Designer to open the page in question.

2) In Design View right-click the List View Web Part and select convert to XSLT Data View  from the context menu.

3) Switch to Split View and locate the "New" button ,and you will see the XSLT code""

4) Set the "td" visibility as "hidden" as shown below:











Additionally, to prevent an unsightly 'blank space' in the menu, I moved the location of the now hidden button to the be the last button on the right of the menu.

Now users have to use the "New" button to create a new document and cannot use the upload button. Keep in mind that you'll have to do this for each view that the users have access to, as each view has it's own page that will need editing.

1 comment:

  1. Looks like this guy stole your content.... http://kishansharepoint.blogspot.ca/2012/08/disable-upload-button-of-document.html

    ReplyDelete