I am trying to update a SharePoint 2010 list through web service. My code can successfully update any list on the ROOT level (or site collection level). It is only when i try to update any list on variation level that the application throws error "The list that is referenced here no longer exists.". Please keep in mind i have tried setting list.url property. Manually updated app.config. Any more ideas please share. My code:
try
{
System.Xml.XmlNode ndListView = list.GetListAndView("{GUID}", "");
string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;
string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;
XmlElement xmlBatchElement = xmlDoc.CreateElement("Batch");
xmlBatchElement.SetAttribute("ListVersion", "1");
xmlBatchElement.SetAttribute("OnError", "continue");
xmlBatchElement.SetAttribute("ViewName", strViewID);
xmlBatchElement.InnerXml = TheCaml; // TheCaml holds XML updates.
try
{
XmlNode xmlReturn = list.UpdateListItems(strListID, xmlBatchElement);
// UpdateListItems gives error that the list does not exist anymore.