Useful SharePoint answers, trial and error SharePoint experience blogged


Record page hit when SPA page transitioning in modern SharePoint sites

Record page hit when SPA page transitioning in modern SharePoint sites

Recently, SharePoint page transitioning has changed from server-side page load to offline first, client-side page transitioning. There is page router component working on the client that handles the page transitioning and, in many cases, modern SharePoint site works as a single page application. This changed the state of the app customizers where onInit event of the customizer does not fire with page transition anymore. So, how we record page hit then?


The CreateCopyJobs API, copy or move SharePoint files or folders

The CreateCopyJobs API, copy or move SharePoint files or folders

This is overview on how the Office 365 CreateCopyJobs API (/_api/site/CreateCopyJobs) works from my observations. For the past months we are seeing new Copy and Move buttons on the SharePoint modern document library actions bar. The APIs behind can copy or move files or folders across different SharePoint site collections or to OneDrive for Business. Here is what I discovered about the APIs.


Create custom Display Templates in classic SharePoint Search site

Create custom Display Templates in classic SharePoint Search site

Create and deploy custom Display Template in classic SharePoint Search site that tracks URL clicks using application insights. We can take the advantage of having our own custom display templates in classic SharePoint search results page to enrich the user experience.


Create PowerShell cmdlet using PowerShell

Create PowerShell cmdlet using PowerShell

Automate devops pipeline using PowerShell cmdlet built with PowerShell instead of C#


Use PowerShell to configure SharePoint search result page tabs

Use PowerShell to configure SharePoint search result page tabs

Configure classic SharePoint search results page navigation programmatically


Analytics using Application Insights on SharePoint classic sites

Analytics using Application Insights on SharePoint classic sites

Use App Insights to track pages, monitor page load times or send custom data events in SharePoint classic site


PowerShell retry logic code

PowerShell retry logic code

This is a small PowerShell retry logic code snipet so I do not have to search for one ever again


Add Taxonomy filed in SharePoint search refinement web part

Add Taxonomy filed in SharePoint search refinement web part

Shows how to add terms with their human readable names as a refiner in a classic search refinement web part


Sitecollection App Catalog error: Cannot find resource for the request

Sitecollection App Catalog error: Cannot find resource for the request

The SharePoint online ALM deploy to site collection app catalog throws error: Cannot find resource for the request.


Unit Test your SharePoint Framework solution with Jest

Unit Test your SharePoint Framework solution with Jest

Setup and use the PnP SPFx-Jest-Enzyme-Sinon unit testing starter kit as unit testing framework with your SPFx web parts or extensions.