Let's SharePoint

Customization

  1. HOME
  2. Customization
  3. Customization
May 23, 2017 / Last updated : May 23, 2017 Sethu Customization

How to calculate total size of a Document library using Powershell in SharePoint 2013/2010/2016?`

Hello SharePointers, Below are the script to find the actual size of documents in document library using Powershell. foreach ($web in $site.AllWebs) { $DocLibSize=0 $count=0 foreach ($list in $web.Lists) { if($list.BaseTemplate -eq “DocumentLibrary”) { $itemSize = 0 foreach ($item in $list.items) { $itemSize += ($item.file).length } $itemSize= [Math]::Round(($itemSize/1MB),2) Write-Host $itemSize “MB ” $DocLibSize+=$itemSize } } […]

February 18, 2017 / Last updated : February 18, 2017 Sethu Customization

How to create a Modern Document Library in SharePoint 2010/2013/Online using CSOM?

Hello SharePointers, Below is the CSOM to create a document library in Sharepoint online using CSOM . ListExperience.NewExperience is the property, we need to  set it up. var SiteURL = @”https://myssharepoint.com/sites/”; var mylogin = “Laks@***.onmicrosoft.com”; var mypassword = “****”; var securePassword = new SecureString(); foreach (char c in password) { securePassword.AppendChar(c); } SharePointOnlineCredentials onlineCredentials = new […]

January 10, 2017 / Last updated : January 10, 2017 Sethu Customization

How to get User Information List information using JSOM in SharePoint 2013/2016/online?

Hello SharePointers, Below is the sharepoint JSOM code to user information list information for a logged in user. ExecuteOrDelayUntilScriptLoaded(getUserProfile, “sp.js”); function getUserProfileInformation(){ var userID= _spPageContextInfo.userId; var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); var userInfoList = web.get_siteUserInfoList(); var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml(“” + userID + “1”); this.collListItem = userInfoList.getItems(camlQuery); clientContext.load(collListItem); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),Function.createDelegate(this, this.onQueryFailed)); […]

October 27, 2016 / Last updated : October 27, 2016 Sethu Client Object Model

How to delete a SharePoint Site in SharePoint Online using Powershell?

Hello SharePointers, Below is the Powershell command to delete a SharePoint site in Online/Office 365 using Powershell Add-Type -Path “c:\folder\Microsoft.SharePoint.Client.dll” Add-Type -Path “c:\folder\Microsoft.SharePoint.Client.Runtime.dll” $siteUrl = “https://myoffice.sharepoint.com/sites/mysites” $password = Read-Host -Prompt “Enter password” -AsSecureString $context = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials(“admin@myoffice.onmicrosoft.com”, $password) $context.Credentials = $credentials $web = $context.Web $ctx.Load($web) $context.ExecuteQuery() $web.DeleteObject() $ctx.ExecuteQuery() Write-Host $web.Title “Site Deleted” […]

July 21, 2016 / Last updated : July 21, 2016 Sethu Client Side Object Model

How to get Owner Group Name in SharePoint Group in Sharepoint 2013 using CSOM?

Hello Sharepointers, In this blog, I will give you the piece of CSOM code to get the SharePoint group owner name. function getGroupOwner (GroupName) { var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); var groups = web.get_groups(); var group = groups.getByName(GroupName); var groupOwner = group.get_owner(); clientContext.load(web); clientContext.executeQueryAsync( function() { console.log(‘Success’); var ownerLoginName = groupOwner.get_ownerTitle(); […]

June 30, 2016 / Last updated : June 30, 2016 Sethu Customization

How to Validate File attachment Name in SharePoint List in Sharepoint 2010?

Hi Sharepointers, If you want to validate the sharepoint file attachment name in Sharepoint 2010, please attach the following script in Content editor web part in the list addform and editform.aspx. <script type=”text/javascript”> function PreSaveAction() { var attachment; var filename=””; var fileNameSpecial = new RegExp(“[~#%&*{}<>;?/+|\”]”); try { attachment = document.getElementById(“idAttachmentsTable”).getElementsByTagName(“span”)[0].firstChild; filename = attachment.data; } catch […]

November 21, 2015 / Last updated : November 24, 2015 Sethu Customization

How to set the Search Centre URL in SharePoint 2013 Using Javascript?

In this blog, I will give you the piece of code to set the Search Center URL in SharePoint 2013 using JavaScript. Below is the piece of code to achieve the same. var context= new SP.ClientContext.get_current(); var web = context.get_site().get_rootWeb(); var properties = web.get_allProperties(); properties .set_item(“SRCH_ENH_FTR_URL”,”/sites/search/mypages”); web.update(); context.load(web); context.executeQueryAsync(function () { alert(“Successful”)); }, function() { […]

Posts navigation

  • «
  • Page 1
  • Page 2

Recent posts

How to insert table in Modern Pages using PnP Powershell in Office 365/Sharepoint Online?

June 7, 2019

How to set up Access Requests in SharePoint online using Powershell?

May 11, 2019

How to change the default SharePoint suite logo in SharePoint 2013/2016/2019?

April 30, 2019

How to add metadata to Document libraries in SharePoint online using powershell.

April 27, 2019

How to get Sharepoint site details using Powershell in Office 365?

April 17, 2019

How to get alerts for a specific policy in Cloud app security using Powershell

April 16, 2019

How to get the list of custom apps in App catalog using Powershell?

April 9, 2019

How to get the list of policies in Microsoft Cloud app security using window powershell?

April 4, 2019

How to get the list of List and Document library item counts in SharePoint online using Pnp Powershell ?

April 4, 2019

How to restore subsite in a Sharepoint online site collection using Pnp Powershell

April 2, 2019

Category

  • Anonymous access
  • Client Object Model
  • Client Side Object Model
  • Customization
    • Customization
  • Designer Workflows
  • Errors & Resolutions
  • Features
  • Google Analytics
  • InfoPath
  • Item Scheduling
  • JSOM
  • Nintex worflows
  • Office 365
  • Office 365 Groups
  • PnP JS Library
  • PowerShell
  • Powershell Online
  • REST API
  • REST API's
  • Server Side Object Model
  • SharePoint 2010
  • SharePoint 2010 Search
  • SharePoint 2013
  • SharePoint 2013 Search
  • SharePoint 2013 Workflows
  • SharePoint 2016
  • SharePoint 2019
  • SharePoint Designer
  • SharePoint Framework
  • SharePoint Online
  • SharePoint Pnp
  • SharePoint Usage Analytics
  • Unique values
  • User Profile Services
  • Windows Powershell
  • Workflow Manager

Archive

  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015

Copyright © Let's SharePoint All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.