I am using csom to add items to target list from source list but I am not able to copy items of only title column.
srcContext = new ClientContext(mpObject.SourceSiteCollection.SiteURL);
targetContext = new ClientContext(mpObject.TargetSiteCollection.SiteURL);
List<Field> srcFieldCollections = new List<Field>();
List srcList = srcContext.Web.Lists.GetByTitle(listName);
srcContext.Load(srcList);
srcContext.ExecuteQuery();
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View/>";
ListItemCollection srcListItemCollection = srcList.GetItems(camlQuery);
srcContext.Load(srcListItemCollection);
srcContext.ExecuteQuery();
ListItemCreationInformation targetItemCreationInfo = new ListItemCreationInformation();
ListItem targetListItem = targetList.AddItem(targetItemCreationInfo);
foreach (ListItem sourceItem in srcListItemCollection)
{
targetListItem["Title"] = "Title";
}
targetListItem.Update();
targetContext.ExecuteQuery();
But it works when I do it for other column. So am I missing anything there?