SharePoint 2010 Take list or site offline to SharePoint Workspace 2010 with javascript

Taking SharePoint lists, libraries or site offline, might be one of the features your customer will ask sooner or later. Normally you have the ECB menu, where you can find the “synchronize with SharePoint Workspace” Button. But maybe you want to create your own button or link or wrap some more logic to this functionality.  In order to do so, i did some researching and came back with a solution, which i would like to share.

In order to achieve this, you’ll have to use a special ActiveXObject which is called Groove.SiteClientActiveX. I found two code snippets and tested them. First one to take offline a whole site and the second one to take a special list or library offline. You need the site url and optionally the list or library id. But look at the code and you will see how it works.

How to take a site offline:

[sourcecode language=”csharp”]

[/sourcecode]

 

How to take a list or library offline:

[sourcecode language=”csharp”]

[/sourcecode]

Just provide a link which calls one of the functions and it opens the SharePoint Workspace 2010.

..:: I LIKE SHAREPOINT ::..

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

About Karsten Schneider 312 Articles
Consultant for Microsoft 365 Applications with a strong focus in Teams, SharePoint Online, OneDrive for Business as well as PowerPlatform with PowerApps, Flow and PowerBI. I provide Workshops for Governance & Security in Office 365 and Development of Solutions in the area of Collaboration and Teamwork based on Microsoft 365 and Azure Cloud Solutions. In his free time he tries to collect tipps and worthy experience in this blog.

Be the first to comment

Leave a Reply