Here is an example of something that was built with them.
The strange thing we were seeing is that every once in a while the search results would stop working. No one seem to do anything or at least change anything but they would stop working.
The search results used custom search result sources (site settings -> manage result sources) and Microsoft SharePoint search rather than Microsoft Graph.
Resolution
After a lot of trying out different queries in the search result sources page the issue was down to one main issue.
Here is the original result source query which looked like this:
The fixed version ended up being this, do you see the subtle difference?
Note: the double quotes around the path.
On a couple of occasions the ” were stripped out of the query when a user went into the search results and we think that an administrator was saving the result query rather than cancelling and this seemed to break the search web part.
Anyway hope that helps someone as it took us a few hours to work out what was going on!
One of the great things about Content Types are that you can have a document template associated to the Content Type.
This means that when you create a new document a customised word template with its own look and feel can be used to guide the user through the process of filling the document and setting up the content type’s metadata.
Recently, we had the situation where we had content types being used across lots of site collections each for the different departments in the organisation.
One of the management overheads is when a document template needs to be updated. How can you do that programmatically using PowerShell?
Well the following script helps you get that done.
Solution
The PowerShell Script, Update-SPContentTypeDocumentTemplate.ps1 below does just that.
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
Write-Host"Applied Document Template $destinationUrl to "$contentType.Name" and updated content type (All Children Update Flag set? $UpdateChildren)"-ForegroundColor Green;
}
else{
Write-Error"Cannot find $ContentTypeName in $Url or cannot find document template file $DocumentTemplatePath, please check.";
}
}
else
{
Write-Host"Cannot find Site $Url"-ForegroundColor Yellow;
Well you provide the URL of the site, the path to the document template and also the name of the Content Type.
It will access the site, check if the content type already has a document template, upload the selected document and configure the content type to use the new document template.
You can decide if you want to update all the child content types which have been assigned to document libraries. if you want to do this which is recommended then make sure you include the -UpdateChild switch.
Example
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