Introduction
In this article, we will see how to create/ configure the version and advanced settings in SharePoint Online Ooffice 365.
After Microsoft launched One Drive for SharePoint Online, the most common workday challenge is organizing documents and sites. Some ways are given below with which you can organize documents and sites in One Drive for Business.
Office 365 provides a variety of ways to find the documents, which you need quickly.
Office 365 introduced many features in the document library to maintain the documents and store the documents.
If you want to get the documents, which are based on the name, in the left side search box; enter the document name and it will return the documents, which are based on the queryText.
It will return based on the conditions given below.
- Documents in your OneDrive for Business.
- Documents that someone has shared with you.
- Documents that are stored on a site, which you follow.
We can see the version settings and advanced version settings about document library.
Click the library settings icon in your SharePoint site.
Click Version Settings link.
In the content approval section, specify whether new items or changes to the existing items should remain in a draft state, until they have been approved.
Specify whether a version is created each time when you edit a file in this document library.
Create a version each time, when you edit a file in this document library.
Example
1, 2, 3, 4
- Create major and minor (draft) versions.
Example
1.0, 1.1, 1.2, 2.0
We can specify Drafts are minor versions or the items, which have not been approved. Specify which users should be able to view the drafts in this document library.
We can give the restrictions to the library.
- Any user, who can read the items
- Only users who can edit the items
- Only users who can approve items (and the author of the item).
Specify whether the users must check out documents prior to making changes in this document library.
Click OK button to save the version settings of SharePoint document library.
Programmatically change the version settings in SharePoint, using CSOM.
Code
- Open your Visual Studio.
- Copy the code given below and paste in your Visual Studio.
- Run it.
- using Microsoft.SharePoint.Client;
- using System;
- using System.Linq;
- using System.Security;
-
- namespace GowthamTutorial
- {
- class Program
- {
- static void Main(string[] args)
- {
-
- ClientContext context = new ClientContext(''https:
- Web web = context.Web;
- string pwd =''XXXXX ;
- string userName='XXXXXXX';
-
- context.Credentials = new SharePointOnlineCredentials(userName, pwd);
- context.Load(web);
- context.ExecuteQuery();
- List list = context.Web.Lists.GetByTitle(''Documents');
- context.Load(list, l => l.EnableVersioning, l => l.EnableMinorVersions);
- context.ExecuteQuery();
- list.EnableVersioning = true;
- list.Update();
- context.ExecuteQuery();
-
- }
- }
- }
Example
Click version history menu settings.
Click View icon and it will redirect to here.
Now, publish this document.
Conclusion
When versioning is enabled in the site lists and libraries, you can track and manage the information as it evolves. This will help you to find enabled version settings in SharePoint Online.
Was my article helpful?
If so, please let me know at the bottom of this page. If not, let me know what was confusing or missing and I’ll use your feedback to double-check the facts, add info and update this article.