Posts

Showing posts with the label list id

How To Add A Delete Button To SharePoint 2013 List Column

Image
In this blog, I will show you how to add a delete button to the SharePoint List / Document Library column as below  Note : In this example I will implement to the document library  Implementation So, simply follow the steps mentioned below. Create a new calculated column. Add the following formula. Just copy and paste the formula into the calculated column. ="<a href='#' onclick='javascript:DeleteItem("&ID&");'><img alt='delete' src='/_layouts/images/delitem.gif' style='border:0px;' /></a>" Select Return data type as : Number an Click "Ok" Note : In here I created a onclick javascript function as ' DeleteItem ' and pass the List Item ID Now we have a link button in the List View  Go to List view page > Settings > Edit Page Add a 'Content Editor' web part and insert the following script <script type="text/javascript"...

How to Reset the List Item ID

Image
How to Reset the List Item ID value numbering at 1 One of the most common problems we in SharePoint lists , there  is no direct way , the value of the ListItem ID reset. In development  environment we used to insert and delete a lot of records and during this time  ID value automatically increases as the ID column is an up counter type.  Finally , when we move to staging and production environments, the website with  backup and restore the ListItem -ID value will not start with 1 . One way of preventing this problem is update the content Database ListID value to 1 Get The specific content database Name Go To the Central Admin Application Management Click on Manage Content Database            Select the specific web Application Database Name will be shown Get The specific List ID (GUID) Method A 1.        Navigate to the list and click  ...