Let's SharePoint

June 2016

  1. HOME
  2. Monthly Archives: June 2016
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 […]

June 30, 2016 / Last updated : June 30, 2016 Sethu SharePoint 2013 Search

This item could not be crawled because the repository did not respond within the specified timeout period. Try to crawl the repository at a later time, or increase the timeout value on the Proxy and Timeout page in search administration. You might also want to crawl this repository during off-peak usage times

In SharePoint 2013, if you get the error message while setting up Search services in SharePoint 2013 , Here is the resolution for you guys Resolution 1 Navigate to IE and Go to Internet Options>Connections>LAN settings. Do uncheck ‘Automatically detect settings’. And check the crawl again. Resolution 2 Go to central admin->Manage service Applications Click on Search […]

June 15, 2016 / Last updated : June 15, 2016 Sethu SharePoint 2013

How to get list of files in a Folder in a SharePoint Library using CSOM?

Hello SharePointers, Below is the CSOM code to get the list of files in a folder in SharePoint library. ClientContext cxt = new ClientContext(“http://sharepointdev/”); List list = cxt.Web.Lists.GetByTitle(“MyDocuments”); cxt.Load(list); cxt.Load(list.RootFolder); cxt.Load(list.RootFolder.Folders); cxt.Load(list.RootFolder.Files); cxt.ExecuteQuery(); FolderCollection fcol = list.RootFolder.Folders; List listFile = new List(); foreach(Folder f in fcol) { if (f.Name == “Myfolder”) { cxt.Load(f.Files); cxt.ExecuteQuery(); FileCollection […]

June 13, 2016 / Last updated : June 13, 2016 Sethu Office 365

How to enable Side Loading in Office 365 or SharePoint online?

Fellow SharePointers, Below is the  Powershell script to enable Side app loading in Sharepoint online environment. try { [Microsoft.SharePoint.Client.ClientContext]$ClientContext = New-Object Microsoft.SharePoint.Client.ClientContext($siteurl) $ClientContext.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password) $site = $ClientContext.Site; $sideLoadingGuid = new-object System.Guid “AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D” $site.Features.Add($sideLoadingGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None); $ClientContext.ExecuteQuery(); Write-Host -ForegroundColor Green ‘SideLoading feature is enabled now’ } catch { Write-Host -ForegroundColor Red ‘Error ‘ […]

June 13, 2016 / Last updated : June 13, 2016 Sethu Client Side Object Model

How to Change Site Master page using JSOM in Sharepoint 2013/2016?

Hello Share pointers, Here is the JSOM code to change SharePoint master page using Java script object model in Sharepoint 2013 and 2016. var context; var web; var MasterPageUrl = ‘/_catalogs/masterpage/mycustom.master’; context = new SP.ClientContext.get_current(); web = context.get_web(); web.set_customMasterUrl(MasterPageUrl); web.set_masterUrl(MasterPageUrl); web.update(); context.executeQueryAsync(function () { alert(“Master Page is” + sMasterPageUrl); }, function (sender, args) { alert(“Error: […]

June 12, 2016 / Last updated : June 12, 2016 Sethu SharePoint 2013

How to add Active Directory group to SharePoint 2013/2016 using Powershell?

Hi Fellow SharePointers, If you want to give acccess to your Sharepoint Site document library or list using Powershell. Here is the source code to achieve the same.   $web = get-spweb “http://mysharepointsite” $account = $web.EnsureUser($Groupfull) $Assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account) $role = $web.RoleDefinitions[“Read, Contribute, or Design”] $Assignment.RoleDefinitionBindings.Add($role) $web.RoleAssignments.Add($assignment) $web.dispose()  Happy Sharepointing folks!!

June 9, 2016 / Last updated : June 9, 2016 Sethu SharePoint 2013

How to Remove User Permissions in SharePoint 2013/2016 using Powershell

Hi  Sharepointers, Lets assume the scenario when a new user leaves the organisation and you want to remove the permission from the sharepoint site that he has acesss to .  You need to run the below powershell to remove the permissions as a adminstrator from powershell commands. $sites = Get-SPSite -Limit All #This loops through […]

June 6, 2016 / Last updated : June 6, 2016 Sethu SharePoint 2013

How to Change Page layout of publishing pages in Sharepoint 2013 using powershell?

Hello Sharepointers, Below are the powershell script to update the pagelayout of all the publishing page in a sharepoint site collection. $spWeb = Get-SPWeb(“http://yoursitecollection/yoursite”) $pWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($spWeb) $pSite = New-Object Microsoft.SharePoint.Publishing.PublishingSite($spWeb.Site); $siteLayouts = $pSite.GetPageLayouts($false) $myLayout = $siteLayouts[“/_catalogs/masterpage/custompagelayout.aspx”] #$myLayout $query = New-Object Microsoft.SharePoint.SPQuery $query.ViewAttributes = “Scope=’RecursiveAll’” $pages = $pWeb.GetPublishingPages($query) foreach ($page in $pages) { if ($page.ContentType.Name […]

June 1, 2016 / Last updated : June 1, 2016 Sethu SharePoint 2013

How to get audit log settings in SharePoint 2013/Office 365 using CSOM?

Hello SharePointers, Below are the code in CSOM to get the audit log settings in Office 365.Audit is the property to look out for. string siteUrl = “https://MyTenant.sharepoint.com/sites/”; var Pwd = new SecureString(); foreach (char c in “TenantAdminPwd”.ToCharArray()) Pwd.AppendChar(c);var siteCtx = new ClientContext(siteUrl); siteCtx.Credentials = new SharePointOnlineCredentials(“admin@MyTenant.onmicrosoft.com”, Pwd); Site site = siteCtx.Site;siteCtx.Load(site.Audit); siteCtx.ExecuteQuery() Happy Sharepointing […]

June 1, 2016 / Last updated : June 1, 2016 Sethu SharePoint 2013

How to Change Default Site Collection Lock Message in SharePoint 2013?

Hi SharePointers. Let us say that your sharepoint administrator has put your sharepoint site to readonly message, you will get the message ‘This site is read only at the farm administrator’s request” at the top of the page. If you want to change this message to the customized one, you can do it with the […]

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.