Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

SharePoint 2013 | Get all Authors or Created By value for a large list

$
0
0

Hi

I have document library which has approximately 50000 + documents and it was provisioned in app web. It has documents/items which were created by users who left the organization hence their accounts are disabled in AD. I am facing an issue when upgrading an app, in ULS i have error message "User cannot be found"

To overcome this issue I thought of writing a script which will help in identifying accounts which exists in Web (get all user in SPWeb.AllUsers collection and user against AD). I am able to get account which disabled. 

Issue is, if disabled user account has been deleted from site collection or web, then I dont get that account in SPWeb.AllUsers or SPWeb.SiteUsers or SPWeb.SiteUserInfoList or SPWeb.User collections. But this id exists within "Created By" or "Author" or "Modified By" or "Editor" field of document library. I know SharePoint retains this information for versioning/audit purposes. 

How do I get information from these fields is there a way to get unique records grouped by "Created by" column using CAML query? 

I have already tried but only way I can come up is to list and dump results in DataTable and perform SQL like operations. I would like to avoid loading of all items.

Please help me, if there is better way to handle this scenario. 

Regards,

RK


Radhakrishna


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>