Hi
I'm trying fetch the properties of file from SharePoint 2010 site using Client Side OM. I'm getting all the properties of file but the value for Last Modified by is different than what I see on the actual SharePoint site.
I'm using below method:
public static Dictionary<string, object> GetFileProperties(string sharepointSitePath, string fileRelativePath) { Guard.ArgumentNotNull(sharepointSitePath, sharepointSitePath); Guard.ArgumentNotNull(fileRelativePath, fileRelativePath); Dictionary<string, object> returnValue = new Dictionary<string, object>(); using (ClientContext clientContext = new ClientContext(sharepointSitePath)) { var file = clientContext.Web.GetFileByServerRelativeUrl(fileRelativePath); clientContext.Load(file, f => f.Exists, f => f.ListItemAllFields); clientContext.ExecuteQuery(); if (file != null && file.Exists && file.ListItemAllFields != null && file.ListItemAllFields.FieldValues != null) returnValue = file.ListItemAllFields.FieldValues; } return returnValue; }
I'm using "Modified_x0020_By" key to fetch the Last Modified By property.
Can anyone guide me on this issue?
Thanks!!
Abhijeet