I have several document libraries. I am trying to get only the documents that the a selected user has however it is returning other authors documents. Attached is my code. Any help would be greatly appreciated.
CamlQuery camlQuery = new CamlQuery(); string query = "<View Scope='Recursive' /><ViewFields><FieldRef Name='File' /><FieldRef Name='FileLeafRef' /><FieldRef Name='LinkFilename'/><FieldRef Name='LinkFilenameNoMenu' /><FieldRef Name='Modified' /><FieldRef Name='Created' /><FieldRef Name='Author' /></ViewFields>" + "<Where><Eq><FieldRef Name='Author' LookupId='TRUE'/><Value Type='Integer'>" + user.Id + "</Value></Eq><AND><Eq><FieldRef Name='ContentType' /><Value Type='Computed'>File</Value></Eq></And></Where>" +"<OrderBy><FieldRef Name='Created' /><FieldRef Name='Modified' /></OrderBy><QueryOptions><RowLimit>" + count + "</RowLimit></QueryOptions></View>"; camlQuery.ViewXml = query; listItems = list.GetItems(camlQuery); clientContext.Load(listItems); clientContext.ExecuteQuery();