Posts

Showing posts with the label SharePoint 2007

SharePoint 2016, 2013 , 2010 , 2007 Create list item with existing ID

Hey Guys, Now i was in a really tricky scenario where a master record had been deleted by someone which was referenced using code in numerous places. Changing the code would be a nightmare. Now the easiest solution which will come to everyones mind is to add the list item with those possible values again. But it would not retain the ID value which was used in the code.Let me give you an example to clarify the problem statement PROBLEM STATEMENT There is a “status” master list with the following values and the third list item is deleted. We want the 3 rd list item with ID=3 to be restored even when it is deleted from recycle bin as in the code the ID column is used to reference the status. Status ID Approved 1 Rejected 2 Review 3 In Draft 4 SOLUTION: Now usually the answers would be    Restore it from recycle bin (almost 3 months have passed and it has been deleted from recycle bi...