This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getcheckoutStatus(listtitle, itemid) { | |
var clientContext = SP.ClientContext.get_current(); | |
if (clientContext != undefined && clientContext != null) { | |
var webSite = clientContext.get_web(); | |
this.list = webSite.get_lists().getByTitle(listtitle); | |
this.item = list.getItemById(itemid); | |
this.file = this.item.get_file(); | |
clientContext.load(this.file); | |
clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CSOM Assembly version - 16.1.4727.1200 | |
//using Microsoft.SharePoint.Client | |
//GetFirstStageRecyclebinItems(credentials, weburl); | |
private static void GetFirstStageRecyclebinItems(SharePointOnlineCredentials credentials, string weburl) | |
{ | |
RecycleBinItemCollection recyclebinItems = null; | |
using (ClientContext ctx = new ClientContext(weburl)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using Microsoft.SharePoint.Client; | |
//using Microsoft.Online.SharePoint.TenantAdministration; | |
//string weburl = "https://site-admin.sharepoint.com"; | |
//GetSiteCollections(credentials, weburl); | |
//This method returns the count of Site Collections available in the tenant | |
//Also returns thr url of all site collections | |
private static void GetSiteCollections(SharePointOnlineCredentials credentials, string weburl) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using Microsoft.SharePoint.Client; | |
//using Microsoft.Online.SharePoint.TenantAdministration; | |
//string weburl = "https://site-admin.sharepoint.com"; | |
//GetSite(credentials, weburl); | |
//This method returns the site collection object based on the url. | |
//shows the count of all subwebs available with in SharePoint online Site Collection | |
//Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.WebsCount property | |
private static void GetSite(SharePointOnlineCredentials credentials, string weburl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using Microsoft.SharePoint.Client; | |
//using System.Net | |
//GetAllLists(credentials, weburl); | |
//This method returns all the lists and libraries from SharePoint website | |
private static void GetAllLists(ICredentials credentials, string weburl) | |
{ | |
using (ClientContext ctx = new ClientContext(weburl)) | |
{ | |
ctx.Credentials = credentials; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CSOM Assembly version - 16.1.4727.1200 | |
//using Microsoft.SharePoint.Client; | |
//using System.Net | |
//GetItemChanges(credentials, weburl, listtitle, itemid); | |
//This method returns all the changes (add, update & delete) happened to the list item | |
private static void GetItemChanges(ICredentials credentials, string weburl, string listTitle, int itemid) | |
{ | |
using (ClientContext ctx = new ClientContext(weburl)) | |
{ |