Copying Document Across Site Collections to Dynamic Locations - Office 365 / SharePoint
I have users uploading documents into a library in one site collection and adding a reference number to each file (text box - list item). Can I use that reference number to find a corresponding folder on a different site collection and programmatically
copy the file to that location? The reference number is part of the name of the folder. SharePoint Designer, Visual Studio, Napa - whichever is easiest. Using Office 365 / SharePoint Online.
Thanks!
Hi,
If the reference number plus with the file name is valid and unique, we will be able to find the wanted folder across site collections by querying this file and its parent folder.
As the reference number + file name is just a string value of a column of a library, we may need to iterate through all the libraries and check whether there is such a file with
CAML query statements.
http://msdn.microsoft.com/en-us/library/office/ms467521(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
As it is an Office 365 site, Client Object Model or REST API would be choices for accessing data of SharePoint Objects.
http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
In SharePoint 2013, App is a more recommended way when developing custom solution.
Here are some samples about
creating SharePoint app for your reference:
http://msdn.microsoft.com/en-us/library/office/jj901637(v=office.15).aspx
http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-get-all-the-items-from-the-list-in-sharepoint-2013-on/
Feel free to reply if there are still any questions.
Best regards
Patrick Liang
TechNet Community Support
Similar Messages
-
Search not working in site collections migrated from MOSS 2007 to SharePoint Server 2013
I have few site collections migrated from MOSS 2007 to SharePoint Server 2013 using database attach (first to 2010 and then to 2013).
When I search for anything in these migrated sites, I get "Nothing here matches your search".
Checked the crawl log for these sites and see this error for all items.
The content processing component failed to process the security descriptor of the item. ( The input ACL is invalid (1210 / 2072).; ; SearchID =
Some-Random-GUID )
Search works fine in newly created sites in 2013 environment.
Please help.Hello
Did you migrate your users to claims when you migrated the databases?
$wa = Get-SPWebApplication http://yourdom.com
$wa.MigrateUsers($true)
$wa.ProvisionGlobally()
I assume the sites that work and the migrated content are in the same database?
MCITP-EA | "Never test how deep the water is with both feet" -
Custom Site MailBox for Office 365 SharePoint 2013 online
Is it possible to create programmatically create site mailbox for Office 365 SharePoint 2013 online?
How to customize site mailbox email address like [email protected]Hi,
In SharePoint 2013 Online, if you want to sync document library with local drive, you can use OneDrive to achieve it.
http://office.microsoft.com/en-001/support/sync-onedrive-for-business-or-sharepoint-site-libraries-to-your-computer-HA102832401.aspx
Best Regards
Dennis Guo
TechNet Community Support -
How to Enable Ratings on SharePoint List using Client Object Model code for Office 365 SharePoint Site.
Thanks in Advance
Rajendra KHi Rajendra,
here you are the code and the blog, let me know if this helps
using (ClientContext ctx = new ClientContext(https://yourSiteUrl))
Web w = ctx.Web;
List l = w.Lists.GetByTitle("yourListName");
ctx.Load(l, info => info.Id);
ctx.ExecuteQuery();
string ListID = l.Id.ToString();
Microsoft.Office.Server.ReputationModel.Reputation.SetRating(ctx, ListID, 1, 5);
ctx.ExecuteQuery();
http://blogs.technet.com/b/speschka/archive/2013/07/08/how-to-use-csom-with-ratings-in-sharepoint-2013.aspx
Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation -
Copying content type across site collection
It is a good practice to create a content type and then create a list from it.
Now, say that we create a content type and then create a list from it.
If we want to create similar list in a different site collection, we need to have the content type in that site collection as well.
Could you please let me know how to copying the content type from one site collection to another.
ThanksHi,
Thanks for posting your query, Kindly try out the below mentioned script to copying your Content Type from one site to another
Add-PSSnapin Microsoft.SharePoint.PowerShell
$w1 = Get-SPWeb "https://sharepointsite1.com"
$w2 = Get-SPWeb "https://sharepointsite2.com"
foreach ($f1 in $w1.Fields) {
if ($f1.Group -eq "PepsiSiteColumns") {
$f2 = $w2.Fields | Where { $_.Id -eq $f1.Id };
if ($f2 -eq $null) {
Write-Host("Creating field " + $f1.Title + "...");
$f2 = $w2.Fields.AddFieldAsXml($f1.SchemaXml);
$f1.Delete(); # Careful with this one!
} else {
Write-Host("Field " + $f1.Title + " already exists. Not taking any action.");
Also, browse below mentioned URL to fix this issue
http://blog.falchionconsulting.com/index.php/2007/08/copy-content-types/
I hope this is helpful to you, mark it as Helpful.
If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh -
Usage of relative url across site collections in sharepoint 2010
Hi
I have a webapplication with 2 sitecollections. In one sitecollection, created a link by going to navigation under sitesettings.
Added relative url to map to 2nd site collection. Eg: /sites/site2/page1.aspx
But by doing so, it is giving error. Help me out how to give relative url pointing to different site collection from another sitecolleciton.
Thanks in advance
NainaSay, Site Collection 1 URL: http://sitecollection1.domain.com/
Site Collection 2 URL : https://sitecollection2.domain.com/
Now, on "Site Collection 1", In Site Actions-->Site Settings-->Navigation, when you use "relative URLs", it will always refer to the current Site Collection i.e Relative URL "/sites/site2" will always be "http://sitecollection1.domain.com/sites/site2".
Anyways, what is the "requirement". What are you trying to solve by using "relative URL" for Site Collection 2 on Navigation of Site Collection 1. Reason for asking is, there might be different approach for your "requirement".
Naveed.DG MCITP, MCTS -SharePoint 2010 Administrator "Vote As Helpful" If it helps!! -
VS2012 Connection to Office 365 Sharepoint Site
Hi,
I m trying to create auto hosted app for my office 365 shp site. while creating project in vs2012, when i click on validate online shp site, it goes inside the site. As a result I m not able to deploy app. It should give me Connection successful message.
Plz help.. if u too came across and solved. Your help is appreciated.
SandyAutohosted Apps have been discontinued (or will be shortly). You need to create it as a Provider Hosted App if you want to use server side code. To do that you need to provision the remote web side of the app manually. VS 2012 projects
are defaulted to an on-premises environment where the remote web can also be hosted on your local IIS instance. That isn't possible in Office 365. Take a look at the following blog for more info.
http://www.andrewconnell.com/blog/sharepoint-autohosted-apps-are-no-more-deprecated-discontinued-dead
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
How to display MS Outlook calendar of a user exactly in Office 365 SharePoint site calendar?
Hi,
I just followed the below article for getting my whole calendar events into my SharePoint Office 365 site's calendar.
http://sharepoint.stackexchange.com/questions/83366/view-outlook-calendar-in-sharepoint-2013
But I get the below error.
The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Basic Realm=""'. (830fe69c-407a-0000-24b4-502420637d1c)
Any ideas how to achieve my requirement?
Thanks in Advance,
ThananHi,
From your description, I know you want to use calendar overlay with exchange online in SharePoint online.
I reproduce your issue, and it throws the same exception to yours. I try to find some information for you, I find that the feature is not available from this article:
http://community.office365.com/en-us/f/148/t/221842.aspx.
Thanks for your understanding.
Best Regards
Vincent Han
TechNet Community Support -
How to use Blob storage to office 365 sharepoint online library documents
Hello,
Considering that we cant uploade a file with size more than 250 MB and it is recommended using Remote
Blob Storage (RBS) if large files are supposed to store in SharePoint.
My question is, how to use RBS or Azure Blob storage to store files instead of SQL database.
What is the configuration or code i need to write to accomplished this where i would prefer if it can be done simply using some configuration.
any sample or tutorial would be great help.
Thanks,
AsjadHI,
What we did, we deploy small Azure PaaS application what used Azure Blob Storage and table and then show it in Office365 SharePoint online trough iframe. This gives you flexibility to customimze the PaaS application and show the content at blog storage.
We tested this in SharePoint ONline multitenant and Dedicated plus in On Premise SharePoint with the custom code in separate IIS server published trough UAG to Internet. This allows you to save or replace your file server with Azure and small PaaS apps in
and show the content on SharePoint ONline trough Iframe.
Br Petri -
Document ID moving across the site collection
Thanks for reading, let me explain my scenario before my question
1. we have huge site collection with full of documents
2. want to enable document id feature to track of documents
3. we want to run the process to archive docs which are older than 6 months into different site collection.
4. after 2 years, we will have 4 archived site collections, documents are spread across the various site collection
Does document id move across the site collections, still users can get old document using initially assigned document id after archive into different site collection?
I read some documentation on document iD that it is targeted for Site Collection level.
S.Venkata AppajiHi Appaji,
According to your description, my understanding is that you want to preserve the Document ID when moving the documents across site collections.
Per my knowledge, the document id will be preserved when the document has been moved from one Site Collection to another Site Collection.
During move operations, SharePoint Server 2010 keeps the document ID. During copy operations SharePoint Server 2010 assigns a new document ID. You can control this by setting a Boolean operator on the PersistID column.
More references:
http://msdn.microsoft.com/en-us/library/ee559302(v=office.14).aspx
http://www.sharepointeurope.com/blog/2013/6/26/sharepoint-moving-a-document-with-a-document-id-to-another-site-collection
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Calendar Overlay Across Multiple Site Collections
I have searched the forums and have not found a solution to this question.
We are having trouble creating calendar overlays across site collections.
Specifics:
1. This is a single farm SharePoint 2013 installation. Version: 15.0.4481.1005
2. We have a single web application http://sharepointweb on port 80
3. We are using host-named site collections
4. We have separated the different departments into separate site collections because we want to take advantage of separate content databases.
When we create calendar overlays between calendar lists within a single site collection...it works fine. When we try to create calendar overlays between site collections (again, within a single web app) it fails with the message "Unable
to find specified web in the given URL".
Some more details:
## query of host headers for HNSCs
Get-SPManagedPath -HostHeader
Name Type
ExplicitInclusion
sites WildcardInclusion
departments WildcardInclusion
## query of URLs for two affected site collections
get-spsiteurl -id 'http://smportal04/departments/dev'
Url Zone
http://intranet/departments/dev Default
http://sharepoint/departments/dev Internet
http://portal/departments/dev Intranet
get-spsiteurl -id 'http://intranet/departments/it'
Url Zone
http://intranet/departments/it Default
http://sharepoint/departments/it Internet
http://portal/departments/it Intranet
##The only entries I can find in the ULS logs
## an example of when I try to do a calendar overlay from the http://intranet/departments/dev calendar
## referencing a calendar in http://intranet/departments/it calendar
Application error when access /_layouts/15/AggregationCustomize.aspx, Error=Unable to find specified web in the given URL - http://intranet/departments/it. at Microsoft.SharePoint.ApplicationPages.Calendar.MashUpCalendarListAccessor.OpenWeb(String
webUrl, SPWebApplication webapp) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.RetrieveListsWithCalendarView(String webUrl) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.FindListFromId(String
id) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.UpdateListViewDropDownList() at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: Unable to find specified web in the given URL - http://intranet/departments/it.
at Microsoft.SharePoint.ApplicationPages.Calendar.MashUpCalendarListAccessor.OpenWeb(String webUrl, SPWebApplication webapp) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.RetrieveListsWithCalendarView(String
webUrl) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.FindListFromId(String id) at Microsoft.SharePoint.ApplicationPages.AggregationCustomizePage.UpdateListViewDropDownList() at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs
e) at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Hi Roo,
i tried some steps, i agree with you that seems calendar overlay cant do good across web application,
from http://y:1234/ and http://y:4563/. seems there are limitation here.
when i extend my web app, usually i create new web app as internal/external/public, then i guess issue is happened.
so, anyway, i got a bit curious if your environment also came out with the same result:http://support.microsoft.com/kb/2025977
at the kb, it was stated, that it may not able to find another site other than the default web app.
but, while i tried in the same web app, the issue not there.
so i tried to create new site collection, with lots of subsites, http://y:1234/. then have http://y.1234/sites/123 and http://y.1234/sites/456, for example, i add new calendar and create overlay, seems it can resolve each one and another.
perhaps you can check this article:
http://spsawyer.wordpress.com/2013/07/11/sharepoint-calendar-overlay-not-found-errors/
Regards,
Aries
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Search across multiple site collections SharePoint 2013
Hi Guys
I have a search center and Enterprise search configured in one site collection, I need to enable it to search content in other site collections too. I am using SharePoint Server 2013 Enterprise on a Windows Server 2012 R2. Can I promote results from
a particular site collection if the user initiates search from that particular site collection..?
Thanks in Advance
ParthHi,
From your description, you want to find a way to promote result from a particular site collection when users search on
Enterprise Search site.
To add promoted result, you can create new query rule and add
Promoted Result or Result Block to highlight the results you want.
Moreover, What do you mean when you say promote results from a particular site collection if the user initiates search from that particular site collection?
A real sample? Please explain more about your requirement so that we can provide more detailed information.
If you are new to SharePoint 2013 search, you may start from:
Search in SharePoint Server 2013
http://technet.microsoft.com/en-us/sharepoint/jj898538.aspx
Manage
Manage the search schema
Manage the Search Center
Manage search relevance
Manage crawling
Manage the search topology
Back up and
restore
Use Windows PowerShell cmdlets to manage search
Miles LI TechNet Community Support -
Publishing Feature for Site Collection
Hi..
I am having 5 different Site Collections in SharePoint Site and from 1st Site Collection we are redirecting to other using Top Link bar, but when we enable Publishing Feature for Different Site Collections the Top Link bar changed..i want to have Standard links
for all
RavindranathPublishing feature is applicable to a Site Collection and its sites.
Quick Approach
A quick solution will be to manage the Navigation (via Site Actions -> Site Settings -> Look and Feel -> Navigation -> Navigation Editing and Sorting -> Global Navigation) for all 5 site collections and add same links. This will show the same
top links for all your site collections.
Correct approach -
For using same navigation (top links) across site collections withing same web application, you need to implement Global Navigation. Google this and you'll find lots of good articles to implement this - Create an xml for site map, copy this to your web application
directory, add the provider in web.config, update the master page to bind the provider to SiteMapDataSource.
This is a proper approach where if you update the xml, changes get applied to all site collections. -
I have a SharePoint 2010 root level site collection SC1 in web application WEBAPP1. I want to create copy of that site collection in same web application WEBAPP1. Apart from Import/Export, Restore/Backup options, will following approach work? If yes , how?
I took backup of content database of web application.
Restored database with different name
Mounted Content database to this WEBAPP1 by assigning new ID to DB
Created new site collection by using this newly mounted DB
Site collection gets created successfully but content does not appear.
Please guide if i can achieve desired functionality by using this approach.
If this helped you resolve your issue, please mark it AnsweredIt is because the Site GUID is identical, and each GUID can only be present on the farm once. You can use Backup-SPSite/Restore-SPSite (which is full-fidelity, unlike Export-SPWeb/Import-SPWeb), which will generate a new GUID for the restore Site Collection,
even in the same Web App.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
I can save department site collection as site collection template. Also I can use this template for a new department site collection creation.
But Managed Meta data Navigation throws the following error
•Error loading navigation: The Managed Navigation term set is improperly attached to the site. (Correlation ID: 6fa6b19c-820a-001d-b9e0-d939d702050a)Hi ,
this is a limitation. please refer this
http://social.technet.microsoft.com/forums/sharepoint/en-US/029b7e2e-661f-4ac3-bfcb-eb99b43016f2/the-selected-term-set-is-already-used-by-another-site
Unfortunately in SP 2013, a termset can only be used by a single site collection for navigation. This is a known limitation. There is no out of the box way to use a central termset to manage navigation across site collections. You need to develop a custom sitemap
provider to do that.
Another way to do this is to create termset for each site collection and reuse/pin the terms from the central termset instead of creating duplicate terms. You can script this easily using Powershell. This has some limitations though.
Also, you can try little customization. Follow this link -
http://www.mavention.com/blog/building-global-naviga
Please remember to click 'Mark as Answer' on the answer if it helps you
Maybe you are looking for
-
Hello, I bought my Mac about two months ago. There are two CD's that came with it. One is called 'Mac OS X Install DVD' and the other one is called 'Applications Install DVD'. Are these already installed on my MacBook or do I have to install them? I
-
Calling stored procedure in Forms4.5-URGENT
HI i am using form4.5 and wanna call my stored procedure to form.how can i. i tried database_procedure_name(update_web); but it din't worked.ny oracle d2k guru tell me its urgent. thanx in advance Sushant Ashutosh [email protected]
-
Can you connect 4k monitors to MBA?
Is it possible to get the full 4k resolution from a 4k monitor connected to a mid 2013 MacBook Air(latest version of Mavericks)? Or do I need to purchase an external graphics card (or a MacBook Pro) perhaps? A mini display port to display port connec
-
BIBeans 9.0.3 install on linux
Has anyone managed to install the 9.0.3 BIBeans-linux package? I unpacked the zip file, and ran runInstaller and it goes into a loop trying to cd to non-existant directory in the install tree. Since runInstaller is just a shell script I looked into i
-
T61 - WWAN does not connect when resuming from sleep mode
Hi. I have a T61 with integrated WWAN, which works perfectly - except I use sleep mode a lot, and when i resume from sleep mode, WWAN doesn't connect, I always get the same error - IP configuration failed. If I restart my OS, WWAN works normally agai