4

I need to be able to create a different item from an existing one, but still keep most of the details and only change some information. Thanks,

Marius
  • 545
  • 6
  • 13
  • 26
  • Dupe of http://stackoverflow.com/questions/1075323/copy-list-items-from-one-list-to-another-in-sharepoint http://stackoverflow.com/questions/1142014/how-to-copy-splistitem-from-one-splist-to-another-splist – Alex Angas Aug 13 '09 at 08:58
  • The other two quetions search for an answer on how to copy/move/clone an item from one list to another - mine is how to clone an item in the same list – Marius Sep 14 '09 at 20:39

2 Answers2

2

Your best bet is to use event receivers. The ItemAdded(Synchronous) or ItemAdding(Asynchronous) event receivers will allow you to access the data from the item that was just added.

You can use this information to create a different item, either in the same list, in a new list, or in any type of storage medium you can get too.

Custom workflows will also give you much of the same ability.

Excellent article on ER's --> http://developers.de/blogs/adis_jugo/archive/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch.aspx

AdamBT
  • 1,936
  • 2
  • 30
  • 48
2

Have you tried using SPListItem.Copy( oldItemURL, newItemURL ) ?

Paul-Jan
  • 16,746
  • 1
  • 63
  • 95