I want to remove all button/links for users to edit item or create item from sharepoint view. Please help me to achieve this.
|
Warning: if you don't want users to be able to edit/create items, removing buttons will not prevent them from doing so anyway. For example, by using direct link. Instead, you should regulate this by setting up correct permissions. You can set permissions through Site Actions -> Site Permissions, assigning Read permission level to some or all users. Also you can create a custom permission level (from the same page, click If you want to remove Edit/Create buttons in addition to setting permissions, it can be done using Sandboxed No-code Solutions. Below, I assume that:
Now, below is the Custom Action code which will remove buttons "New item" and "Edit item" in all the lists (list views + list display forms) in your site/site collection (that depends on the feature scope):
This can be deployed as Sandboxed No-code Solution (i.e. it doesn't include dll file). This will work perfectly well in Office365 and wherever Sandboxed Solutions are available. Also, you can achieve this using PowerShell if you have appropriate permissions. |
|||||||||||
|
|
Set the view to use no tool bar. This will hide the option to create items. Switch the Title column to just Title so they can't dive into the item and edit it. Though this is security through obscurity, users could still edit and create items if they know the URLs. It'd be better to just give the users Read permission to the list. |
|||
|