Thursday 16 May 2019

SharePoint Online The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator


Microsoft.SharePoint.SPQueryThrottledException


SharePoint Online Lists and library are capable of storing around 30 million 

items or files in a SharePoint list or library.

In order to overcome the error listview threshold of 5000 items , Create an index for the column

Below is the rest api query while i am trying to query a list which has 11,000 records and trying to filter with non indexed column which is throwing below error



In Order to overcome to above error, i went ahead and created an index for the column which i am querying 








Tuesday 30 April 2019

SharePoint Online Update List item

SharePoint Online Update Rich Text Column html

We had a business requirement to remove/update the list items by removing unnecessary styles added at list item

Below is the code snippet which will loop through all the items and removes  strings  ex: data between style tags i.e all the styles between  <style> </style>

cls
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

$UserName= "username@companyname.com"
$Password = "pwd"
$credentials= New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
$webURL="https://companyname.sharepoint.com/teams/sitename/"
$ctx= New-Object Microsoft.SharePoint.Client.ClientContext($webURL)
$ctx.Credentials = $credentials
$list = $ctx.web.Lists.GetByTitle("Resources")
$listItems = $list.GetItems([Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery())
$ctx.load($listItems)
$ctx.executeQuery()

foreach($item in $listItems)
{

     try
    {
    $startIndex=$item["Overview_x0020_Text0"].IndexOf("<style>")
    $endIndex=$item["Overview_x0020_Text0"].IndexOf("</style>")
    If($startIndex -gt  0)
    {

    $newitem=$item["Overview_x0020_Text0"].Remove($startIndex,$endIndex+8)
    $item["Overview_x0020_Text0"]=$newitem
    $item.Update();
    Write-Host -ForegroundColor DarkGreen $item.Id   "Item Updated"
    }
     }
     catch
     {
       Write-Host -ForegroundColor Red  $item.Id "Item Not Updated"

     }
}

    $ctx.ExecuteQuery()




Friday 1 March 2019

Email address empty after user profile synchronization


After user profile synchronization email address attribute is empty


To fix the issue





Start incremental sync which will resolve the issue

Monday 21 January 2019

The Tool was unable to install Web Server(IIS) Role

SharePoint 2019 unable to install Web Server Role




The issue was due to .Net 3.5 framework was not installed, hence Follow the below steps





 



The sources file is on your Windows Server 2016 installation media, and you need to specify it and have it mounted
on your computer (or copied somewhere) for the prerequisite install to work properly

Make sure to replace the F:\sources\sxs to the actual path of your sources file.


Everything should work properly afterwards to run the prerequisite installer