Tuesday, November 6, 2018

SharePoint Online External Sharing on Subsites: "Your organization's policies don't allow you to share with these users. Go to External Sharing in the Office 365 admin center to enable it."

Scenario: You enable external sharing for a site collection in SharePoint Online. You notice that you can share externally on the parent site, but not any of its subsites.

Solution: You simply need to deactivate the 'Limited-access user permission lockdown mode' site collection feature, as shown in the screenshot below.

That is all.

Monday, August 20, 2018

Content Search Web Part: Open Links in New Tab

Just a quick post on how to configure a Content Search Web Part to open links in a new tab. See steps below.

1. Using SharePoint Designer, copy an existing item display template in order to create your own custom item display template (Site Settings > Master pages and layouts > Display Templates > Content Web Parts). For my needs, I usually copy the Item_TwoLines.html file. NOTE: You only need to copy the HTML file, not the JavaScript file (.js file) associated with the HTML file.

2. Edit the properties of your copied HTML file and give it a unique Name, Title, and Description.

3. Using SharePoint Designer, check-out your new HTML file, and edit it. Find the line of code as shown below, and add target="_blank".

4. Save the file, check it in, and publish it.
5. Edit your Content Search Web Part. Under the 'Display Templates' section, select the title of your custom item display template in the Item drop-down menu, and select the OK button to save your web part configuration.

Links should now open in a new tab.

Tuesday, June 26, 2018

SharePoint Online: Automating Document Set File Template Revisions with Microsoft Flow

Managing the file templates associated with a Document Set content type can be tedious process, especially when the source files are regularly modified in a document library outside of the Document Set content type. To perform this operation manually, you first need to download a copy of each modified template, and then upload them to the 'Default Content' section under Library Settings > Content Type Name > Document Set settings. In this blog post, I am going to provide the steps needed to automate this task using Microsoft Flow.

1. Using a blank flow, begin with the following trigger. Add your site address, select your Library Name, and leave the Folder field blank if you want the flow to look at the entire library.

2. Add a condition and configure it so that the flow can find the file templates to be overwritten. See the syntax below. Template1Name represents the name of the first document set template, and so on. In this example, there are three file templates in the document set content type.
@or(contains(triggerBody()?['{Name}'], 'Template1Name'), contains(triggerBody()?['{Name}'], 'Template2Name'), contains(triggerBody()?['{Name}'], 'Template3Name'))

3. For the Yes section of the condition, add the 'Copy file' SharePoint action to the flow. See the screenshot below for further details. I am using the 'File name with Extension' dynamic content item in both Source and Destination fields. NOTE: The Destination File Path is pointing to the content type location. You should be able use Windows Explorer and browse to this location manually. So, if you run into any issues with this path, you can test to see if you can view in Windows Explorer.

4. For the No section of the condition, you can simply leave it blank if you only have one content type. If you have multiple content types for which you need to automate the document set file templates, you will need to add another condition under the No part with its own set of Yes/No sections, and configure it similar to steps 2 and 3 above.

Hope this helps make your SharePoint life better!

Wednesday, November 8, 2017

Hide the "Follow" link on the hover panel for people search results

I had a request recently to hide the "Follow" link shown on the hover panel for people search results. Upon trying a number of different ideas, I found the easiest way to accomplish this task is to modify the display template associated with this functionality. See steps below.

1. At your search center site, go to Site Settings, and click on Master pages and page layouts under the Web Designer Galleries section.

2. Click on Display Templates > Search, and find the Item_Person_HoverPanel.html file. Download a copy of this file to your desktop.

3. Edit the file in notepad, and comment out the following line.

<div class="ms-calloutLink ms-uppercase" id="_#= followId =#_"></div>

My blog posts have been few and far between lately as I have been super busy pursuing an MBA at my dream school - Notre Dame. After finishing, I will post more!

Friday, March 3, 2017

Content Search Web Part: Subsites not sorting correctly

If you are one of many using the Content Search web part to display all subsites of a parent site, and the sorting by Site title is not working as expected, use the following tips to get it working correctly.

1) Use one of the refinable string managed properties and map it to the 'ows_SiteName' crawled property. I used the RefinableString00 managed property.

2) Create a new Result Source on the parent site. Site Settings > Results Sources (under Search). Create a New Result Source. Give it an appropriate name, scroll down, and click the 'Launch Query Builder' button. In the Query text box, add your query as needed. I used "path:"https://company.sharepoint.com/sites/sitename" contentclass:STS_Web  UrlDepth=3" to show the first level of subsites on my parent site. Next, click the SORTING tab, and select your refinable string managed property. Select the OK button.

3) In the Content Search web part query, click the link to 'Switch to Advanced Mode'. Select your newly created Results Source in the drop-down, and clear the Query text box. Select the OK button.

4) If your subsites are still not sorting correctly in the web part, try re-indexing them. On each subsite, go to Site Settings > Search and offline availability (under Search). Click the 'Reindex Site' button.