How to copy Sharepoint list item to another list including list item versions

bklmnsh used Ask the Experts™
Hello experts,

I'm copying sharepoint list item to another list using following code:

SPListItem newItem = destinationList.Items.Add();
newItem["ows_Title"] = sourceItem["ows_Title"];

What code do i need to add in order to copy list item versions as well?

Thanks for your help in advance!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

check the link below,

see the method GetListItemVersionInformation on the page


krunal_shah, thank you for your prompt reply.
Your link provides information how to read list item version information, and this is quite trivial.
However I still need assistance how to copy versions information into new list item.
I'm not able to write newItem.Versions = sourceItem.Versions since Versions property is readonly, and there is no method in Versions collection allowing to add versions programatically.
Any help will be highly appreciated.
Jamie McAllisterCloud Expert
Most Valuable Expert 2013
Top Expert 2014

This link details how to move list items. More digging would be required to move the prior versions too.

If not, I'm wondering if the Content Deployment API would do it for you?
None of the above suggestions worked for me. Currently I'm just updating and item with data for each version so it contains all the modifications. Not very good solution but I'm not able to find better one.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial