Is there a way to check when was a file checked out on SharePoint Online?
I'm trying to export a list of all checked-out files and also need their checked out date.
Using C#, I came up with following logic but cannot find any field that holds CheckedOutDate value.
var DocLibName = "Documents";
var list = ctx.Web.Lists.GetByTitle(DocLibName);
ctx.Load(list);
ctx.ExecuteQuery();
string qCommand = "<View Scope=\"RecursiveAll\"><Query><OrderBy><FieldRef Name='ID' Ascending='TRUE'/></OrderBy></Query><RowLimit Paged=\"TRUE\">5000</RowLimit></View>";
ListItemCollectionPosition position = null;
List<ListItem> allItems = new List<ListItem>();
do
{
var camlQuery = new CamlQuery();
camlQuery.ListItemCollectionPosition = position;
camlQuery.ViewXml = qCommand;
ListItemCollection currentCollection = list.GetItems(camlQuery);
ctx.Load(currentCollection);
ctx.ExecuteQuery();
position = currentCollection.ListItemCollectionPosition;
allItems.AddRange(currentCollection);
break;
} while (position != null);
var checkedoutUsers = allItems.Where(x => x.FieldValues["CheckoutUser"] != null).ToList();