Hi ,
I am working in sharepoint 2013, This is a custom timer timer Execute method where i am moving a document item from one library to other once its expired,it was running fine and suddenly giving following error:-
One or more field types are not installed properly. Go to the list settings page to delete these fields.<nativehr>0x81020014</nativehr><nativestack></nativestack>
StackTrace = " at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)\r\n at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrView...
I have filled all the meta data(site column) for the item but still same error, Please help me out as i have no clue why it is giving this error
public override void Execute(Guid targetInstanceId) { SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(sourceUrl)) { using (SPWeb web = site.OpenWeb()) { //gets the document lib SPList listFrom = web.Lists[sourceList]; //gets the expired documents items SPQuery query = new SPQuery(); query.ViewFields = "<FieldRef Name='Expiration_x0020_Date'/>"; query.Query = @"<Where><Leq><FieldRef Name='Expiration_x0020_Date'/><Value Type='DateTime' ><Today /></Value></Leq></Where>"; SPListItemCollection items = listFrom.GetItems(query); //if expired items found if (items.Count > 0) { SPFile oFile = null; foreach (SPListItem item in items) { string strfile = item.File.Name; oFile = web.GetFile(sourceList + "/" + strfile); //oFile.CopyTo("Archive/" + strfile); oFile.MoveTo(destinationList + "/" + strfile); } } } } }); }