0 out of 1 rated this helpful Rate this topic

SPListItem.CopyFrom Method (String)

Overwrites the current item with the specified version of the item.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public void CopyFrom(
	string sourceUrl
)

Parameters

sourceUrl
Type: System.String
The URL of the specified version of the item to copy and overwrite the current item.
NoteNote

The source URL must reside on the same server on which the code is running. This copy operation does not copy from URLs on remote servers.

Exception Condition
ArgumentException

sourceUrl is null or empty.

NotSupportedException

The SPListItem object has an external data source.

The CopyFrom method resets the CopySource property on the destination item to the value of the sourceUrl parameter.

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ