Hello Guys,
I am struggling to resolving on below approach, Can you please help me out ?
Kindly consider below scenario :
WebApplication : Sharepoint -1111
Site Collections :
1. http://mysite:1111/
2. http://mysite:1111/sites/dc1
3. http://mysite:1111/sites/dc2
4. http://mysite:1111/sites/dc3
All site collections having DOC ID feature enabled and working, Is there anyway to find out document of any site collection by document ID in top level site collection ?
Your help will be highly appreciated.
Thanks and Regards,
In each site collection you can add a unique prefix to the document id. If you index document id on documents you should easy find documents by document id in all site collections with search.
Have you got chance to test my code posted below.
It is working at my end.
Thank you Senthil to look up on this .
In SharePoint 2010 , document feature can be set to site collection level.
suppose in organization having one intranet web application with multiple site collections under same.Now I have document Id but I don’t know which site collection it belongs to and hence I cant find the document.so instead of that If I make it generalize across all site collection under same web application , It make process easy to find particular document.
I hope it helpful to understand the scenario further. consider read permission in all site collections.
Please let me know if anything else I can help with ?
Thanks and Regards,
Dipti
Please check this out: I have created a console Application to get documents based on ID from all site collection of one Web Application
Add reference to Microsoft.Office.DocumentManagement assembly from 15hive\ISAPI folder
static void Main(string[] args)
{
string[] arrDocumentIDs = { “ASGAKS-4-1”, “DOCUMENT-4-1” };
SPWebApplication webApp = SPWebApplication.Lookup(new Uri(“http://site”));
SPSiteCollection sites = webApp.Sites;
foreach (SPSite site in sites)
{
Console.WriteLine(“{0}:- {1}”, site.RootWeb.Title, site.Url);
DocumentIdProvider provider = DocumentId.GetProvider(site);
foreach (string strDocId in arrDocumentIDs)
{
try
{
var result = provider.GetDocumentUrlsById(site, strDocId);
Console.WriteLine(result[0]);
}
catch { }
}
}
Console.ReadLine();
}Hope this will help you out
The question is bit confusing. Please let us know, what you want to achieve by finding the document at top level site collection. Also let us know the user’s permission on all site collections.
Regards,
K Senthilrajan