Monthly Archives: October 2013

Open SharePoint 2010 Search Results In A New Window

Configuring SharePoint 2010 to open search results in a new window requires editing the XSL that determines the search result display.

Open your search results page and edit the page.  Choose Edit Web Part from the Search Core Results web part. Expand display properties and click on XSL Editor…


Copy and paste XSL into a tool like Notepadd++.  Search for the section

<div class=”srch-Title3″>

Scroll down and add the attribute for target.


Copy and paste the XSL back into the window in SharePoint.  Save and publish the page.


Send SharePoint Email Alerts To External Users

If you need to send SharePoint email alerts to external users via Microsoft Exchange, you need to allow SMTP relay on Exchange.  This involves creating a custom SMTP receive connector with the permission to relay email.  See this MS Exchange blog article for the steps you need to follow.

Open SharePoint 2013 Search Results In The Client Application

If you configure SharePoint 2013 to work with Office Web Apps (link), by default SharePoint will open Word, Excel etc. documents in the browser using the Office Web Apps.  You can configure SharePoint to open documents in the client application or browser on a site collection or document library basis, see here.  However, even if you choose to configure SharePoint to open documents in the client application at the site collection, search results still open in the browser.  In my case I wanted Office Web App integration to enable search result previews, but I wanted search results to open in the client application.

In order to open search results in the client application I had to alter the Item_CommonItem_Body.html search results display template.  Item_CommonItem_Body.html is the display template that’s rendered  by _#=ctx.RenderBody(ctx)=#_ within a display template.  Below is the section in one of my custom display templates.

Search2013WebApps1For an overview of display templates read this MS Technet blog article.

Within Item_CommonItem_Body.html is a section that references ctx.ScriptApplicationManager.states.openDocumentsInClient.


In order to force search results to open in the client application I added a line in my custom display template to set the value of ctx.ScriptApplicationManager.states.openDocumentsInClient to true.


Open in Client Detail

This results in the behavior where search result previews using Office Web Apps still work, but when a user clicks on a result it opens in the client application.


Enabling SharePoint Search With An Active Directory Forest Trust

Having configured SharePoint 2010 Search I had a problem whereby some users received zero results when searching SharePoint content.

In this configuration SharePoint was in one forest (A) and the users who got zero results were in another forest (B).  Users in the A forest were able to search and get results.  In order to resolve the issue I had to convert the SharePoint Search Service Application to store the SharePoint ACLs in Claims format.

To convert the SharePoint Search Service Application open the SharePoint Management Shell and run Get-SPServiceApplication.  Copy the ID of the Search Service Application.



Now run the code below replacing %SearchServiceID% with your Search Service Application ID.

$SearchApp = Get-SPServiceApplication %SearchServiceID%
$SearchApp.setproperty(“ForceClaimACLs”, 1)

Run a full crawl and users in the other forest will get search results.

Updating SharePoint 2010 Web Parts For SharePoint 2013

Following an upgrade from SharePoint 2010 to 2013 I deployed some custom web parts.  When loading the page I received the error “/_CONTROLTEMPLATES/WEBPARTNAME/VisualWebPart1/VisualWebPart1UserControl.ascx” does not exist.


The error is caused by the web part looking in the \14\TEMPLATE\CONTROLTEMPLATES folder rather than \15\TEMPLATE\CONTROLTEMPLATES.  Open the web part solution in Visual Studio and change the _ascxPath string.  Original value below:



Change the string to include the 15 folder.



Rebuild and re-deploy the web part.


Renaming SharePoint Taxonomy Terms

If you rename a taxonomy term in SharePoint, the change doesn’t take effect instantly.  You have to wait for the SharePoint Timer Job “Taxonomy Update Scheduler” to run, which by default is every 1 hour.

If you want the change to take place immediately, or to change the job schedule, open Central Administration -> Monitoring -> Review job definitions.  Scroll through the jobs until you reach the Taxonomy Update Schedule for the web application where you made the change.  Click on the job title and click Run Now, or reschedule the job.