Retrieve files from Sharepoint Document Library that are checked out using CSOM

Brass Contributor

Hi,

I have a document library, with some meta data fields that are required while uploading a document to library. Few users just upload the document without entering the metadata values- Which leaves the document in Checked Out status that can be seen only by the user or the Administrator by going to Library Settings.

 

I have tried using CSOM code by writing CAML query. But it lists only the documents that have all the meta data values entered and checked out to any user. 

<Query>

 <Where>

    <IsNotNull><FieldRef Name='CheckoutUser' /></IsNotNull>

 </Where>

 </Query>

 

Is there a way to get such type of files using CSOM?

1 Reply

alternative ways to do....

 

1 - I'm guessing for permission reasons you don't want users to view files other users have checked out?

 

From the page they upload the content from, create a button ('admin' button?) to a seperate page with which has list webpart...select the fields you want visible and then filter the list on the checked out file and make it =[Me]

2. if you don't want to create an alternate page to visit.....in the list, create the required view as above....filter to checkoutuser = [Me]. Then use CSS and the webpart options to hide the options to view other views of the list - when using CSS put target audience on web part so admins can still see full page and only the users get the limited options.