<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnetmafia.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dot Net Mafia</title><link>http://www.dotnetmafia.com/blogs/</link><description>Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>How to: Get a Result Source Id in SharePoint 2013</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/05/21/how-to-get-a-result-source-id-in-sharepoint-2013.aspx</link><pubDate>Tue, 21 May 2013 15:45:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6335</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Result Sources in SharePoint 2013 are quite powerful.&amp;#160; However to make use of them in your queries, you have to know the Id which you pass to the &lt;strong&gt;SourceId&lt;/strong&gt; parameter of a query.&amp;#160; For out-of-the-box result sources, the Ids are static.&amp;#160; When you start creating your own though, you need a way to retrieve the Ids programmatically.&amp;#160; Unfortunately, the only way to retrieve the Ids is to use the managed API.&amp;#160; This means they can’t be retrieved using JavaScript or REST.&amp;#160; With that aside, I still wanted to show you how you could write managed code to retrieve a result source id.&lt;/p&gt;  &lt;p&gt;For today’s example, I am going to build a console application, but you could also implement this in a web part or other code directly executing on a SharePoint server in the farm.&amp;#160; Whenever you build a console application using SharePoint, be sure and change the platform target to x64.&amp;#160; Then, we need to add a few references which we can find in the ISAPI folder of the 15 hive.&amp;#160; Add the following assemblies to your project.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.Office.Server&lt;/li&gt;    &lt;li&gt;Microsoft.Office.Server.Search&lt;/li&gt;    &lt;li&gt;Microsoft.SharePoint&lt;/li&gt;    &lt;li&gt;Microsoft.SharePoint.Security&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In our code, we’ll need a heap of assemblies to get started.&amp;#160; Add the following using statements.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.Office.Server.Search;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.Office.Server.Search.Administration;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.Office.Server.Search.Administration.Query;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Next, we need to get a reference to the Search Service Application Proxy so that we can retrieve the result source.&amp;#160; There are a number of ways to do this, but I am going to get it by name.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt; settingsProxy = &lt;span style="color:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.ServiceProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;     &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt; searchProxy = settingsProxy.ApplicationProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Search Service Application&amp;quot;&lt;/span&gt;);&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;   &lt;p&gt;Once you have a proxy object, it is easy to get the result source and then the id.&amp;#160; The proxy object has a method &lt;strong&gt;GetResultSourceByName&lt;/strong&gt; method.&amp;#160; You can pass it the name of the result source you want, but you also need to specify a &lt;strong&gt;SearchObjectOwner &lt;/strong&gt;object&amp;#160; to specify which level you want to access it at (Service Application, Site Collection, or Site).&amp;#160; I’ll show you each one starting with Service Application.&amp;#160; In my example, I have result resources created at each level.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ResultSources_2BC44E15.png"&gt;&lt;img title="ResultSources" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ResultSources" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ResultSources_thumb_430F5286.png" width="489" height="341" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This creates a SearchObjectOwner for the site collection.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt; serviceApplicationOwner = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;SearchObjectLevel&lt;/span&gt;.Ssa);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Next we pass it as the second parameter to GetResultSourceByName.&amp;#160; The first parameter is simply the name of the result source.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SourceRecord&lt;/span&gt; serviceApplicationResultSource = searchProxy.GetResultSourceByName(&lt;span style="color:#a31515;"&gt;&amp;quot;Service Application Result Source&amp;quot;&lt;/span&gt;, serviceApplicationOwner);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Assuming, there is a matching result source, all you need to do is use the Id parameter on the &lt;strong&gt;SourceRecord &lt;/strong&gt;object.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Guid&lt;/span&gt; serviceApplicationResultSourceId = serviceApplicationResultSource.Id;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;You can then use that Id in your own queries using the &lt;strong&gt;SourceId&lt;/strong&gt; keyword. &lt;/p&gt;  &lt;p&gt;If you want to reference a result source at the site collection or site level, you need to do a few extra steps.&amp;#160; Start by getting a web object.&amp;#160; You need this whether you are using a site collection or site and I’ll show you why shortly.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt; site = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;http://sp2010/sites/test&amp;quot;&lt;/span&gt;))&lt;/p&gt;    &lt;p style="margin:0px;"&gt;{&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPWeb&lt;/span&gt; web = site.OpenWeb())&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Inside our using block, we’ll add our code.&amp;#160; Let’s get things at the site (web) level first.&amp;#160; We do this by creating a SearchObjectOwner specifying a SearchObjectLevel of SPWeb and passing a second parameter containing our SPWeb object.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt; siteOwner = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;SearchObjectLevel&lt;/span&gt;.SPWeb, web);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, we pass the SearchObjectOwner to the GetResultSourceByName method like before.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;&lt;span style="color:#2b91af;"&gt;       &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;         &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SourceRecord&lt;/span&gt; siteResultSource = searchProxy.GetResultSourceByName(&lt;span style="color:#a31515;"&gt;&amp;quot;Site Result Source&amp;quot;&lt;/span&gt;, siteOwner);&lt;/p&gt;       &lt;/div&gt; &lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Like before, we can use the Id parameter to get the id of the result source.&lt;/p&gt;  &lt;p&gt;To access result sources at a site collection, the API is a bit different than what you might be used to.&amp;#160; We create a new SearchObjectOwner object and we specify a SearchObjectLevel of SPSite.&amp;#160; In this case, we also pass it the SPWeb object from before even though we want the site collection.&amp;#160; It’s a bit different but it works.&amp;#160; Here’s what it looks like.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt; siteCollectionOwner = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SearchObjectOwner&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;SearchObjectLevel&lt;/span&gt;.SPSite, web);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SourceRecord&lt;/span&gt; siteCollectionResultSource = searchProxy.GetResultSourceByName(&lt;span style="color:#a31515;"&gt;&amp;quot;Site Collection Result Source&amp;quot;&lt;/span&gt;, siteCollectionOwner);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;That’s all it takes to get a result source id.&amp;#160; As I mentioned earlier, it is unfortunate that we can’t get a result source id any other way, but this will work if you are writing managed code in on-premises SharePoint 2013.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6335" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>Slides and code samples from my Search talk at SharePoint Summit Toronto</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/05/16/slides-and-code-samples-from-my-search-talk-at-sharepoint-summit-toronto.aspx</link><pubDate>Thu, 16 May 2013 14:42:53 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6331</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I’ve had yet another fun week up here in Canada.&amp;#160; I gave a brand new talk about the new ways to query search in SharePoint 2013.&amp;#160; I had a room full of developers that asked a lot of great questions.&amp;#160; As promised, my slide deck is below at SlideShare.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.slideshare.net/CoreyRoth/fives-ways-to-query-share-point-2013-search-sharepoint-summit-toronto-2013"&gt;Five ways to query SharePoint 2013 Search&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the session, I mentioned that I had code samples on MSDN Code, so I am providing the link below.&amp;#160; Try them out and download them and rate them if you find them useful.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=User&amp;amp;f%5B0%5D.Value=CoreyRoth%20%5BMVP%5D"&gt;SharePoint 2013 Search Samples&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Follow me on twitter: &lt;a href="https://twitter.com/coreyroth"&gt;@coreyroth&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6331" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>SharePoint 2013 Autocomplete textboxes using the term store and CSOM</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/30/sharepoint-2013-autocomplete-textboxes-using-the-term-store-and-csom.aspx</link><pubDate>Tue, 30 Apr 2013 15:30:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6302</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;I wanted to create an autocomplete textbox in a SharePoint app recently by using terms from the term store.&amp;#160; Since retrieving items from the term store can be a bit involved I wanted to show you the steps involved.&amp;#160; This solution make use of &lt;a href="http://jqueryui.com/autocomplete/"&gt;jQuery UI Autocomplete&lt;/a&gt;.&amp;#160; The code loads the terms from the term store and then sets the source.&amp;#160; This implementation is really only ideal for a small amount of terms, but it’s enough to get you started.&lt;/p&gt;  &lt;p&gt;For this example, I am going to use a simple set of terms using state names in the United States.&amp;#160; My terms are included in a group named &lt;em&gt;Classification&lt;/em&gt; and a Term Set named &lt;em&gt;States&lt;/em&gt;.&amp;#160; Here is what my term store looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/TermStoreStates_54DB147C.png"&gt;&lt;img title="TermStoreStates" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="TermStoreStates" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/TermStoreStates_thumb_3A2E7863.png" width="285" height="264" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this example, we’re going to build our code inside a &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-rtm.aspx"&gt;Client Web Part&lt;/a&gt;.&amp;#160; Take a look at that post if you are not familiar with the process yet.&amp;#160; We then need to add a heap of JavaScript references.&amp;#160; Some of these are included already, but specifically we need to load &lt;strong&gt;SP.Taxonomy.js&lt;/strong&gt;.&amp;#160; We also need to include &lt;strong&gt;init.js&lt;/strong&gt; as I mentioned in an earlier &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/29/javascript-runtime-error-notifyscriptloadedandexecutewaitingjobs-is-undefined.aspx"&gt;blog post&lt;/a&gt;.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Scripts/jquery-1.7.1.min.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/MicrosoftAjax.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/init.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.runtime.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.taxonomy.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;My web part is called &lt;em&gt;AutocompleteWebPart.aspx&lt;/em&gt; so I am going to add a JavaScript file for my code called &lt;em&gt;AutocompleteWebPart.js&lt;/em&gt;.&amp;#160; We also need to include a reference to &lt;a href="http://jqueryui.com"&gt;jQuery UI&lt;/a&gt;&amp;#160; You’ll need to download this and include it in your project or pull it from a CDN.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Scripts/AutocompleteWebPart.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Scripts/jquery-ui-1.9.1.custom.min.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Lastly to use jQuery UI, you need to include it’s CSS file in the &lt;em&gt;Content&lt;/em&gt; folder of your project.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;link&lt;/span&gt; &lt;span style="color:red;"&gt;rel&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Stylesheet&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/css&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;href&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Content/jquery-ui-1.8.22.custom.css&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, I am just going to add a textbox to the body of our page.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;body&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;input&lt;/span&gt; &lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;autocompleteTextBox&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;body&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The process for querying terms is involved.&amp;#160; You first need to get a reference to the Taxonomy Session, followed by the Group, the Term Set, and finally you can iterate the terms.&amp;#160; There are a lot of good examples out there but many of them take short cuts by using GUIDs for values for things like the group and term set.&amp;#160; This works but is absolutely useless when you are writing proper code that can be deployed to any environment.&amp;#160; You need to be able to reference these items by name, but unfortunately the API makes accessing anything in the term store by name difficult.&amp;#160; It’s not impossible though, it just requires extra code and iteration.&amp;#160; Let’s walk through our JavaScript example below with absolutely no hard-coded GUIDs.&lt;/p&gt;  &lt;p&gt;We’ll start by adding some global variables.&amp;#160; We’ll populate these as we go.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; context;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; session;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; termStore;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; groups;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; termSets;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; termsArray = [];&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;We’ll start in a document ready function.&amp;#160; We use the standard code to get a reference to the current context.&amp;#160; We’ll need this to create a new TaxonomySession object.&amp;#160; We then &lt;em&gt;session.GetDefaultSiteCollectionTermStore()&lt;/em&gt; to get the default term store.&amp;#160; From there, we need to context.load on the session and termStore objects.&amp;#160; We then use a typical &lt;em&gt;executeQueryAsync &lt;/em&gt;method to execute our query.&amp;#160; The &lt;em&gt;onTaxonomySession&lt;/em&gt; method will handle success and we’ll use a shared &lt;em&gt;onTaxonomyFailed&lt;/em&gt; method to handle any failures.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;$(document).ready(&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SP.ClientContext.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; termStore = session.getDefaultSiteCollectionTermStore();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context.load(session);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context.load(termStore);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context.executeQueryAsync(onTaxonomySession, onTaxonomyFailed);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Just like with the managed API, you must configure your Managed Metadata Service Application Client appropriately in order for the default term store call to work.&amp;#160; Click on the &lt;em&gt;Managed Metadata Service Connection&lt;/em&gt; and then click &lt;em&gt;Properties&lt;/em&gt;.&amp;#160; Now, make sure the checkbox next to &lt;em&gt;This service application is the default storage location for column specific term sets &lt;/em&gt;is checked.&amp;#160; Once, you have made this change your code should work.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedMetadataServiceDefaultChecked_6AE1800E.png"&gt;&lt;img title="ManagedMetadataServiceDefaultChecked" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ManagedMetadataServiceDefaultChecked" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedMetadataServiceDefaultChecked_thumb_5E735CE5.png" width="527" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The &lt;em&gt;onTaxonomySession &lt;/em&gt;method then retrieves a list of groups.&amp;#160; We have to retrieve all groups because there isn’t a method to just retrieve one by name.&amp;#160; Although there is a method to retrieve a group by id.&amp;#160; Since we don’t want to hard code any GUIDs though.&amp;#160; We have to retrieve all groups and iterate them to find the one we want.&amp;#160; A successful query will call &lt;em&gt;onGroupsLoaded&lt;/em&gt;.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onTaxonomySession() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; groups = termStore.get_groups();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.load(groups);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.executeQueryAsync(onGroupsLoaded, onTaxonomyFailed);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;In this method we have a list of the groups so we need to iterate through them and find the one we want.&amp;#160; In this case, &lt;em&gt;Classification&lt;/em&gt;.&amp;#160; The code isn’t ideal but it works.&amp;#160; We start by getting an enumerator with &lt;em&gt;getEnumerator()&lt;/em&gt;.&amp;#160; We then use this enumerator to examine the groups.&amp;#160; In our loop, we use &lt;em&gt;get_current() &lt;/em&gt;to get &lt;em&gt;currentGroup&lt;/em&gt;.&amp;#160; We then use &lt;em&gt;get_name()&lt;/em&gt; to compare against the one we want.&amp;#160; When a match is found, we call another method &lt;em&gt;getTermSets&lt;/em&gt; and pass the term set.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onGroupsLoaded() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// iterate termStores&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; groupEnumerator = groups.getEnumerator();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;while&lt;/span&gt; (groupEnumerator.moveNext()) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; currentGroup = groupEnumerator.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (currentGroup.get_name() == &lt;span style="color:#a31515;"&gt;&amp;#39;Classification&amp;#39;&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; getTermSets(currentGroup);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;In the &lt;em&gt;getTermSets&lt;/em&gt; method, we call &lt;em&gt;get_termSets.&lt;/em&gt;&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; getTermSets(currentGroup) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; termSets = currentGroup.get_termSets();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.load(termSets);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.executeQueryAsync(onTermSetsLoaded, onTaxonomyFailed);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The &lt;em&gt;onTermSetLoaded&lt;/em&gt; method will then iterate through the term sets returned and compare by name in the same way.&amp;#160; In this case, we are looking for the term set named &lt;em&gt;States&lt;/em&gt;.&amp;#160; When the match is found, we call &lt;em&gt;getTerms()&lt;/em&gt;.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onTermSetsLoaded() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; termSetEnumerator = termSets.getEnumerator();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;while&lt;/span&gt; (termSetEnumerator.moveNext()) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; currentTermSet = termSetEnumerator.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; termSetName = currentTermSet.get_name();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (termSetName == &lt;span style="color:#a31515;"&gt;&amp;#39;States&amp;#39;&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; getTerms(currentTermSet);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;This is now the last call we need to make.&amp;#160; This retrieves all of the terms for the term set.&amp;#160; Unfortunately, we have to get all of them (as far as I know) which is why I don’t recommend this with large term sets.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; getTerms(termSet) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; terms = termSet.get_terms();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.load(terms);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; context.executeQueryAsync(onTermsLoaded, onTaxonomyFailed);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The &lt;em&gt;onTermsLoaded&lt;/em&gt; method will iterate through the terms and add them to an array that the jQuery UI autocomplete method will accept.&amp;#160; There you have it all of the code to get items from a term set without a hard coded GUID.&amp;#160; It’s a lot of code, but not too bad once you get used to it.&lt;/p&gt;  &lt;p&gt;Lastly, we’ll get a reference to our textbox and use the &lt;em&gt;.autocomplete()&lt;/em&gt; method passing in the value of our array.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onTermsLoaded() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; termsEnumerator = terms.getEnumerator();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;while&lt;/span&gt; (termsEnumerator.moveNext()) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; currentTerm = termsEnumerator.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; termsArray.push(currentTerm.get_name());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#autocompleteTextBox&amp;quot;&lt;/span&gt;).autocomplete({ source: termsArray });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;At this point, we are done, but we do need to implement our failure method.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onTaxonomyFailed(sender, args) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; alert(&lt;span style="color:#a31515;"&gt;&amp;#39;Taxonomy Error:&amp;#39;&lt;/span&gt; + args.get_message());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;If you are using this code in an app, the last thing you need to do is set the &lt;em&gt;Taxonomy &lt;/em&gt;permission to &lt;em&gt;Read&lt;/em&gt; in the &lt;em&gt;AppManifest.xml&lt;/em&gt; file.&amp;#160; This will let us query the term store.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AppManifrstTaxonomy_6F0B57D3.png"&gt;&lt;img title="AppManifrstTaxonomy" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="AppManifrstTaxonomy" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AppManifrstTaxonomy_thumb_06C28F3A.png" width="490" height="148" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point, we can test it.&amp;#160; Deploy your app and add the app part to a page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AutocompleteExample_0C9D32D3.png"&gt;&lt;img title="AutocompleteExample" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="AutocompleteExample" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AutocompleteExample_thumb_39B21FA1.png" width="423" height="301" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;So, a little code involved here but the results are great.&amp;#160; You can configure the jQuery autocomplete plugin in a variety of ways too.&amp;#160; This code could probably be optimized some so if you have improvements, let me know.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6302" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Client+Object+Model/default.aspx">Client Object Model</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/JavaScript/default.aspx">JavaScript</category></item><item><title>JavaScript runtime error: 'NotifyScriptLoadedAndExecuteWaitingJobs' is undefined</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/29/javascript-runtime-error-notifyscriptloadedandexecutewaitingjobs-is-undefined.aspx</link><pubDate>Tue, 30 Apr 2013 02:57:58 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6301</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I recently ran into the following error when working with a SharePoint 2013 Client Web Part (App Part) while accessing the term store using &lt;strong&gt;SP.Taxonomy.js&lt;/strong&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;JavaScript runtime error: &amp;#39;NotifyScriptLoadedAndExecuteWaitingJobs&amp;#39; is undefined.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs_4E891536.png"&gt;&lt;img title="SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs_thumb_66404C9C.png" width="441" height="250" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The following line gets hit in the debugger.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs2_24C59A43.png"&gt;&lt;img title="SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPTaxonomyErrorNotifyScriptLoadedAndExecuteWaitingJobs2_thumb_0A85311F.png" width="531" height="79" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The code I had worked fine inside a page, but when placed inside a client web part, I received the error.&amp;#160; I thought it might be something to do with the order in how I loaded the script files.&amp;#160; I recently switched to the new Client Web Parts set up in the RTM version of the Office Developer Tools.&amp;#160; This particular update changes the references to the JavaScript files to the page instead of being loaded dynamically with &lt;em&gt;$.GetScript()&lt;/em&gt;.&amp;#160; It turns out it had nothing to do with that.&amp;#160; Instead, I just needed to add a reference to &lt;em&gt;Init.js&lt;/em&gt;.&amp;#160; Here is what my complete list of references looks like in the page for my client web part.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Scripts/jquery-1.7.1.min.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/MicrosoftAjax.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/init.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.runtime.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.taxonomy.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;If you receive the error above that is all you have to do..&amp;#160; Luckily, it’s easy to fix.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6301" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Error/default.aspx">Error</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Query Search with the SharePoint 2013 JavaScript Client Object Model</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/18/how-to-query-search-with-the-sharepoint-2013-javascript-client-object-model.aspx</link><pubDate>Fri, 19 Apr 2013 03:08:32 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6286</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;As a developer, if you have ever looked for information on how to query search in SharePoint, there is a good chance that you have ran into one of my articles.&amp;#160; I’ve been writing about how to query search in a variety of different ways since 2007.&amp;#160; They have always been some of the most popular articles on my site.&amp;#160; SharePoint 2013 has so many new ways to query search, it has taken me time to write up all of the different ways.&amp;#160; I am keeping the tradition alive by writing about how to query using the JavaScript Client Object Model provided by &lt;strong&gt;SP.Search.js&lt;/strong&gt;.&amp;#160; You may have already seen my post on how to query from &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx"&gt;JavaScript and REST&lt;/a&gt; or my post on how to use the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/10/how-to-query-search-with-the-sharepoint-2013-client-object-model.aspx"&gt;managed CSOM&lt;/a&gt; to Query Search.&amp;#160; You’ll find that querying from JavaScript looks very similar to the managed side of things.&amp;#160; In fact even the namespaces are the same and most of the code is quite similar between C# and JavaScript.&amp;#160; However, there are some nuances due to JavaScript so I wanted to share a complete code sample.&lt;/p&gt;  &lt;p&gt;I am going to build my example inside a SharePoint-hosted app.&amp;#160; If you’re not familiar with that process yet, take a look at my &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/08/01/how-to-build-a-sharepoint-hosted-client-web-part-in-sharepoint-2013.aspx"&gt;Client Web Part&lt;/a&gt; post to get started.&amp;#160; When it comes to apps, you need to be sure and request permission to access search.&amp;#160; Do this by editing your &lt;strong&gt;AppManifest.xml&lt;/strong&gt; and clicking on the permissions tab.&amp;#160; Select &lt;em&gt;Search&lt;/em&gt; and then select &lt;em&gt;QueryAsUserIgnoreAppPrincipal&lt;/em&gt;.&amp;#160; If you forget this step, you won’t get an error, your queries will simply just return zero results.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppRESTPermission_thumb_01B6F03D.png" alt="" /&gt;&lt;/p&gt;  &lt;p&gt;I’m going to put all of my code in the welcome page today.&amp;#160; My default.aspx page will have the same HTML as my other JavaScript post.&amp;#160; I simply add a textbox, a button, and a div to hold the results.&amp;#160; The user will type in his or her query, click the button, and then see search results. &lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&amp;#160;&amp;#160; &lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;label&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;for&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchTextBox&amp;quot;&amp;gt;&lt;/span&gt;Search:&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;label&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&amp;#160;&amp;#160; &lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;input&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchTextBox&amp;quot;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&amp;#160;&amp;#160; &lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;input&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchButton&amp;quot;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Search&amp;quot;&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span class="Apple-converted-space"&gt;&amp;#160;&lt;/span&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;resultsDiv&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="white-space:normal;text-transform:none;word-spacing:0px;font:13px consolas;margin:0px;letter-spacing:normal;text-indent:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;We’re going to edit &lt;strong&gt;App.js &lt;/strong&gt;next.&amp;#160; Since we’re in an App, I am assuming you already have code to get the SharePoint context since Visual Studio adds it for you.&amp;#160; If not, you can get it like this.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; context = SP.ClientContext.get_current();&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;I then add a click event handler to my document ready function.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;$(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchButton&amp;quot;&lt;/span&gt;).click(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;});&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;In here, we’ll put our code to get a &lt;strong&gt;KeywordQuery &lt;/strong&gt;and &lt;strong&gt;SearchExecutor&lt;/strong&gt; object to execute our query in a similar manner to the Managed CSOM approach.&amp;#160; Now, we need to get our KeywordQuery object using the context object we already have.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; keywordQuery = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Then, we set the query text using the value the user entered in the textbox with &lt;strong&gt;set_queryText()&lt;/strong&gt;.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;keywordQuery.set_queryText($(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchTextBox&amp;quot;&lt;/span&gt;).val());&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, we just need to create a SearchExecutor object and execute the query.&amp;#160; I am assigning the results of the query back to a global variable called &lt;em&gt;results&lt;/em&gt;.&amp;#160; Since apps by default have ‘use strict’ enabled, you need to be sure and declare this first.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; searchExecutor = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;results = searchExecutor.executeQuery(keywordQuery);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Then like any CSOM code, we have to use &lt;strong&gt;executeQueryAsync&lt;/strong&gt; to make the actual call to the server.&amp;#160; I pass it methods for success and failure.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;context.executeQueryAsync(onQuerySuccess, onQueryError);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;I generally prefer using REST to do my search queries.&amp;#160; However, when it comes to processing results, the data we get back from CSOM is typed better and much easier to access.&amp;#160; This results in less code that we have to deal with.&amp;#160; You can get quite a bit of data back such as the number of results returned just by exmaining &lt;strong&gt;results.m_value&lt;/strong&gt;.&amp;#160; Each individual result can be found in &lt;strong&gt;results.m_value.ResultTables[0].ResultRows&lt;/strong&gt;.&amp;#160; The managed properties of each row are typed directly on the object so that it means you can access them directly if you know the name (i.e.: Author, Write, etc). Iterating the values is simple using $.each.&amp;#160; Take a look at my example where I am writing the values into an HTML table.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQuerySuccess() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $.each(results.m_value.ResultTables[0].ResultRows, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Title + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Path + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Author + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Write + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The last thing to implement is the code to handle errors.&amp;#160; It just sends the error to an alert dialog.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQueryFail(sender, args) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; alert(&lt;span style="color:#a31515;"&gt;&amp;#39;Query failed. Error:&amp;#39;&lt;/span&gt; + args.get_message());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;When we run the app, it will look something like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppCSOMDefault_66525EAD.png"&gt;&lt;img title="SearchAppCSOMDefault" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchAppCSOMDefault" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppCSOMDefault_thumb_5978088F.png" width="277" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Executing a query will show us the four columns I specified in my $.each statement.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppCSOMResults_2326E080.png"&gt;&lt;img title="SearchAppCSOMResults" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchAppCSOMResults" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppCSOMResults_thumb_3667971F.png" width="644" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Pretty easy, right?&amp;#160; Here is the entire code snippet of my &lt;strong&gt;App.js&lt;/strong&gt;.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#39;use strict&amp;#39;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; results;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; context = SP.ClientContext.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; user = context.get_web().get_currentUser();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;$(document).ready(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchButton&amp;quot;&lt;/span&gt;).click(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; keywordQuery = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; keywordQuery.set_queryText($(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchTextBox&amp;quot;&lt;/span&gt;).val());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; searchExecutor = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; results = searchExecutor.executeQuery(keywordQuery);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context.executeQueryAsync(onQuerySuccess, onQueryFail)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;});&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQuerySuccess() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $.each(results.m_value.ResultTables[0].ResultRows, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Title + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Author + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Write + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Path + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQueryFail(sender, args) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; alert(&lt;span style="color:#a31515;"&gt;&amp;#39;Query failed. Error:&amp;#39;&lt;/span&gt; + args.get_message());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Although, I typically prefer the REST interface for querying search.&amp;#160; I have to admit, I like the ease of working with the results in CSOM.&amp;#160; Hopefully, you find this sample useful.&amp;#160; Thanks!&lt;/p&gt;    &lt;p&gt;I’ve also uploaded the full Visual Studio solution to &lt;a href="http://code.msdn.microsoft.com/SharePoint-2013-Querying-a629b53b"&gt;MSDN Code Samples&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6286" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Client+Object+Model/default.aspx">Client Object Model</category></item><item><title>Speaking at SharePoint Saturday Houston, San Antonio SharePoint Users Group, and SharePoint Summit Toronto</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/10/speaking-at-sharepoint-saturday-houston-san-antonio-sharepoint-users-group-and-sharepoint-summit-toronto.aspx</link><pubDate>Wed, 10 Apr 2013 18:54:51 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6267</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I’ve got a number of talks coming up that I am excited about.&amp;#160; It turns out that talking about my experiences publishing SharePoint 2013 apps to the Office Store is hot!&amp;#160; I’ve already spoken about it in Austin and now I’ll be speaking about it at the following events:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.sharepointsaturday.org/houston/default.aspx"&gt;SharePoint Saturday Houston&lt;/a&gt; (4/13)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sasug.net/SitePages/Home.aspx"&gt;San Antonio SharePoint Users Group&lt;/a&gt; (4/26)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.dfwsharepoint.com/"&gt;Dallas Fort Worth Users Group&lt;/a&gt; (6/18)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you’re in a major city in Texas and want to hear about apps, I’ve got you covered!&amp;#160; This talk covers my personal experiences building a business around selling apps in the Office Store.&amp;#160; The talk is mostly non-technical and covers more of the details around what you need to submit and publish an app.&amp;#160; If you’re going to be at any of the events be sure and check it out.&lt;/p&gt;  &lt;p&gt;I’m also giving a talk about the various aspects of the Search API in SharePoint 2013 at &lt;a href="http://www.sharepointsummit.org/toronto/Pages/default.aspx"&gt;SharePoint Summit Toronto&lt;/a&gt; (5/13 – 5/15).&amp;#160; If you’re going to be in the area, be sure and check it out!&lt;/p&gt;  &lt;p&gt;Follow me on twitter: &lt;a href="https://twitter.com/coreyroth"&gt;@coreyroth&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6267" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Build Client Web Parts in SharePoint 2013 with Office Developer Tools RTM</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-rtm.aspx</link><pubDate>Tue, 09 Apr 2013 20:37:44 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6262</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;This is the third time (and hopefully final) I am writing this post about building Client Web Parts (App Parts) for SharePoint 2013 with Visual Studio 2012.&amp;#160; This is largely due to the Office Developer Tools going through a few iterations (&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/08/01/how-to-build-a-sharepoint-hosted-client-web-part-in-sharepoint-2013.aspx"&gt;Preview 1&lt;/a&gt; and &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-preview-2.aspx"&gt;Preview 2&lt;/a&gt;).&amp;#160; I don’t want to leave out-dated information out there, so here is the updated version.&amp;#160; The process remains largely the same, but a few of the screens have changed and what Visual Studio produces for us has changed significantly since Preview 1.&lt;/p&gt;  &lt;p&gt;When you create the project, the first two steps look pretty much the same as Preview 1 and Preview 2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMNewAppProject_75F2B5E8.png"&gt;&lt;img title="VS2012RTMNewAppProject" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMNewAppProject" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMNewAppProject_thumb_119741DF.png" width="542" height="376" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next step looks the same as well.&amp;#160; For our example, we’ll go with a SharePoint-hosted app again.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMNewAppProjectStep2_51612864.png"&gt;&lt;img title="VS2012RTMNewAppProjectStep2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMNewAppProjectStep2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMNewAppProjectStep2_thumb_4A41EBEC.png" width="489" height="390" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The good news is, in Preview 2 they’ve added a wizard that helps you get stared with client web parts.&amp;#160; This wizard does three things for you.&amp;#160; It creates an application page for the client web part, it add it to elements.xml, and it registers the CSS files from SharePoint so that the content inside the IFRAME is styled appropriately.&amp;#160;&amp;#160; They have also added all of the required JavaScript files you need.&amp;#160; I’ll talk about those more in a second. Once you have created the project, add a new item, and choose &lt;strong&gt;Client Web Part (Host Web)&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartSPI_0A0BD272.png"&gt;&lt;img title="VS2012RTMClientWebPartSPI" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMClientWebPartSPI" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartSPI_thumb_099F9F7D.png" width="506" height="350" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You’ll notice on the list that there is a new entry for Search Configuration as well.&amp;#160; I talked about that last week in a &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/03/importing-search-configurations-with-sharepoint-apps.aspx"&gt;previous post&lt;/a&gt;.&amp;#160; When you go to the next step, you get a new dialog in the wizard that gives you the option to create a new page for the client web part.&amp;#160; This dialog has been updated slightly since Preview 2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartSPIPart2_09336C88.png"&gt;&lt;img title="VS2012RTMClientWebPartSPIPart2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMClientWebPartSPIPart2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartSPIPart2_thumb_02143010.png" width="472" height="373" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When you complete the wizard, it will generate quite a bit of HTML and JavaScript including all of the script files needed to get started referencing SharePoint.&amp;#160; Let me post the whole code snippet, so you can see what I mean.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="background:yellow;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color:blue;"&gt;@&lt;/span&gt; &lt;span style="color:maroon;"&gt;Page&lt;/span&gt; &lt;span style="color:red;"&gt;language&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;C#&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Inherits&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;span style="background:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="background:yellow;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color:blue;"&gt;@&lt;/span&gt; &lt;span style="color:maroon;"&gt;Register&lt;/span&gt; &lt;span style="color:red;"&gt;Tagprefix&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;SharePoint&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Namespace&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint.WebControls&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Assembly&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;span style="background:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="background:yellow;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color:blue;"&gt;@&lt;/span&gt; &lt;span style="color:maroon;"&gt;Register&lt;/span&gt; &lt;span style="color:red;"&gt;Tagprefix&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Utilities&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Namespace&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint.Utilities&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Assembly&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;span style="background:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="background:yellow;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color:blue;"&gt;@&lt;/span&gt; &lt;span style="color:maroon;"&gt;Register&lt;/span&gt; &lt;span style="color:red;"&gt;Tagprefix&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;WebPartPages&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Namespace&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint.WebPartPages&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Assembly&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;span style="background:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;WebPartPages&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:maroon;"&gt;AllowFraming&lt;/span&gt; &lt;span style="color:red;"&gt;ID&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;AllowFraming&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;html&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;head&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../Scripts/jquery-1.7.1.min.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/MicrosoftAjax.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.runtime.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;/_layouts/15/sp.js&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;#39;use strict&amp;#39;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// Set the style of the client web part page to be consistent with the host web.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; hostUrl = &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (document.URL.indexOf(&lt;span style="color:#a31515;"&gt;&amp;#39;?&amp;#39;&lt;/span&gt;) != -1) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; params = document.URL.split(&lt;span style="color:#a31515;"&gt;&amp;#39;?&amp;#39;&lt;/span&gt;)[1].split(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;amp;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;for&lt;/span&gt; (&lt;span style="color:blue;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; params.length; i++) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; p = decodeURIComponent(params[i]);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (&lt;span style="color:maroon;"&gt;/^SPHostUrl=/i&lt;/span&gt;.test(p)) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; hostUrl = p.split(&lt;span style="color:#a31515;"&gt;&amp;#39;=&amp;#39;&lt;/span&gt;)[1];&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; document.write(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;&amp;#39;&lt;/span&gt; + hostUrl + &lt;span style="color:#a31515;"&gt;&amp;#39;/_layouts/15/defaultcss.ashx&amp;quot; /&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;break&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (hostUrl == &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; document.write(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;/_layouts/15/1033/styles/themable/corev15.css&amp;quot; /&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; })();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;head&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;body&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;body&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;html&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The above code differs from Preview 2 in that it also includes references to &lt;em&gt;MicrosoftAjax.js&lt;/em&gt;, &lt;em&gt;sp.runtime.js &lt;/em&gt;and &lt;em&gt;sp.js&lt;/em&gt;.&amp;#160; Why we never bothered to include scripts this way in the past is beyond me.&amp;#160; In the past, we used &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/10/19/how-to-use-the-sharepoint-2013-client-object-model-sp-js-from-a-client-web-part.aspx"&gt;$.getScript&lt;/a&gt; to dynamically load the SharePoint scripts.&amp;#160; That’s way over complicated when you can just get it out of the layouts directory.&amp;#160; &lt;/p&gt;  &lt;p&gt;At this point, I recommend adding another script file to your project.&amp;#160; I tend to go with one script per client web part.&amp;#160; You can put all of your script code in there.&amp;#160; At this point, you’re also ready to deploy the client web part and try it out.&amp;#160; Deploy, your project, click on the Developer Site link, and then edit the page.&amp;#160; Click &lt;em&gt;App Part&lt;/em&gt; and then choose your newly deployed client web part.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartDeployed_4FB05C90.png"&gt;&lt;img title="VS2012RTMClientWebPartDeployed" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMClientWebPartDeployed" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMClientWebPartDeployed_thumb_48912018.png" width="415" height="232" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That should get your started.&amp;#160; On a related note, the JavaScript code also changed slightly in App.js (the script file for your default.aspx page).&amp;#160; Here’s what it looks like if you’re curious.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMAppJs_5A6DB3E5.png"&gt;&lt;img title="VS2012RTMAppJs" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012RTMAppJs" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012RTMAppJs_thumb_72FD5135.png" width="442" height="345" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;The new tools make it much easier to get started with Client Web Parts, so be sure and get them if you haven’t already.&amp;#160; Also take a look at my &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/08/01/how-to-build-a-sharepoint-hosted-client-web-part-in-sharepoint-2013.aspx"&gt;Preview 1&lt;/a&gt; and &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-preview-2.aspx"&gt;Preview 2&lt;/a&gt; posts as they can walk you through some of the other steps.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6262" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/WebPart/default.aspx">WebPart</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Query SharePoint 2013 using REST and JavaScript</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx</link><pubDate>Tue, 09 Apr 2013 19:15:40 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6261</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I have a session coming up at SharePoint Summit Toronto this year about the many different ways you can query search.&amp;#160; Whenever I am working on a new talk, it is customary for me to write blog posts about my examples so here it is. :)&amp;#160; I first learned how to query SharePoint 2013 search with the new REST API and JavaScript from looking at examples from &lt;a href="http://twitter.com/scothillier"&gt;@ScotHillier&lt;/a&gt; on &lt;a href="http://code.msdn.microsoft.com/SharePoint-2013-Perform-a-1bf3e87d"&gt;MSDN&lt;/a&gt;.&amp;#160; However, the last time I tried the example, I noticed an issue which I equate to most likely a change between beta and RTM.&amp;#160; This post shows you my version of how to query search using the REST API and JavaScript.&amp;#160; &lt;/p&gt;  &lt;p&gt;For this post, I am using the RTM Office Developer tools (which I have a post coming out on soon).&amp;#160; I am going to use a SharePoint-hosted app for my example but you could also use this in a web part with farm solution as well.&amp;#160; When it comes to apps, you need to be sure and request permission to access search.&amp;#160; Do this by editing your &lt;strong&gt;AppManifest.xml&lt;/strong&gt; and clicking on the permissions tab.&amp;#160; Select &lt;em&gt;Search&lt;/em&gt; and then select &lt;em&gt;QueryAsUserIgnoreAppPrincipal&lt;/em&gt;.&amp;#160; If you forget this step, you won’t get an error, your queries will simply just return zero results.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppRESTPermission_0FF5692D.png"&gt;&lt;img title="SearchAppRESTPermission" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SearchAppRESTPermission" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppRESTPermission_thumb_01B6F03D.png" width="469" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For my example, I am just going to add my code to the default.aspx page in the app.&amp;#160; I simply add a textbox, a button, and a div to hold the results.&amp;#160; The user will type in his or her query, click the button, and then see search results.&amp;#160; You could put this in a &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-preview-2.aspx"&gt;Client Web Part&lt;/a&gt; if you wanted.&amp;#160; &lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;label&lt;/span&gt; &lt;span style="color:red;"&gt;for&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchTextBox&amp;quot;&amp;gt;&lt;/span&gt;Search: &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;label&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;input&lt;/span&gt; &lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchTextBox&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;input&lt;/span&gt; &lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;searchButton&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Search&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;resultsDiv&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, we need to add the necessary code to &lt;strong&gt;App.js&lt;/strong&gt;.&amp;#160; I start by removing the example code that retrieves the user information.&amp;#160; I instead, add a click handler to my &lt;em&gt;searchButton&lt;/em&gt; to execute the search query.&amp;#160; If you remember from my &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/07/getting-started-with-the-search-rest-api-in-sharepoint-2013-preview.aspx"&gt;previous post on REST&lt;/a&gt;, we assemble a URL by appending &lt;em&gt;/api/search/query&lt;/em&gt; to a SharePoint host URL.&amp;#160; For example.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://server/_api/search/query&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;However, in an app, we have to request the URL to the App.&amp;#160; One way to do this is by query string using the &lt;em&gt;SPAppWebUrl&lt;/em&gt; parameter.&amp;#160; SharePoint passes this parameter to your app start page automatically.&amp;#160; We can request it with a line line this.&amp;#160; Remember &lt;em&gt;getQueryStringParameter() &lt;/em&gt;is a helper method that we have gotten from some of the SharePoint examples.&amp;#160; I’ll include it in the full code listing at the bottom of this post.&lt;/p&gt; &lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;       &lt;p&gt;var&lt;/p&gt;     &lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font color="#000000" size="2" face="Consolas"&gt;spAppWebUrl = decodeURIComponent(getQueryStringParameter(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&amp;#39;SPAppWebUrl&amp;#39;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;&lt;font color="#000000"&gt;));&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;   &lt;p&gt;To pass the user’s query to SharePoint, we need to include the &lt;em&gt;querytext&lt;/em&gt; parameter on the REST URL.&amp;#160; Be sure to enclose the value in single quotes.&amp;#160; Again more details in my &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/07/getting-started-with-the-search-rest-api-in-sharepoint-2013-preview.aspx"&gt;previous post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size="2"&gt;&lt;a href="http://server/_api/search/query?querytext=&amp;rsquo;SharePoint&amp;rsquo;"&gt;http://server/_api/search/query?querytext=’SharePoint’&lt;/a&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Now, we need to create a click handler for the search button, build the URL, and then execute the query.&lt;/p&gt; &lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;     &lt;p&gt;$(&lt;/p&gt;   &lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&amp;quot;#searchButton&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;).click(&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; () {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;      &lt;p&gt;});&lt;/p&gt;   &lt;/font&gt;&lt;/font&gt;  &lt;p&gt;Inside the click handler, assemble the URL, using the concatenation of the &lt;em&gt;spAppWebUrl&lt;/em&gt;, &lt;em&gt;/api/search/query&lt;/em&gt;, and the &lt;em&gt;querytext&lt;/em&gt; parameter.&amp;#160; The value of querytext will be retrieved from the textbox we added earlier.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; queryUrl = spAppWebUrl + &lt;span style="color:#a31515;"&gt;&amp;quot;/_api/search/query?querytext=&amp;#39;&amp;quot;&lt;/span&gt; + $(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchTextBox&amp;quot;&lt;/span&gt;).val() + &lt;span style="color:#a31515;"&gt;&amp;quot;&amp;#39;&amp;quot;&lt;/span&gt;;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, we just execute the query with &lt;strong&gt;$.ajax()&lt;/strong&gt;.&amp;#160; Pass the &lt;em&gt;queryUrl &lt;/em&gt;in the &lt;em&gt;url&lt;/em&gt; parameter.&amp;#160;&amp;#160; This example uses the &lt;em&gt;GET&lt;/em&gt; method but if you have a lot of parameters, you may consider using &lt;em&gt;POST&lt;/em&gt; instead.&amp;#160; Lastly, this part is key to get this example to work.&amp;#160; The accept header must have value of &lt;em&gt;&amp;quot;application/json; odata=verbose&amp;quot;&lt;/em&gt;.&amp;#160; The &lt;em&gt;odata=verbose &lt;/em&gt;part is not in the MSDN example.&amp;#160; If you leave it out, you will receive an error.&amp;#160; The last parameters are the methods that will handle the success and failure of the AJAX call.&amp;#160; Here’s what the whole method looks like.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;$(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchButton&amp;quot;&lt;/span&gt;).click(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; queryUrl = spAppWebUrl + &lt;span style="color:#a31515;"&gt;&amp;quot;/_api/search/query?querytext=&amp;#39;&amp;quot;&lt;/span&gt; + $(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchTextBox&amp;quot;&lt;/span&gt;).val() + &lt;span style="color:#a31515;"&gt;&amp;quot;&amp;#39;&amp;quot;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $.ajax({ url: queryUrl, method: &lt;span style="color:#a31515;"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;, headers: { &lt;span style="color:#a31515;"&gt;&amp;quot;Accept&amp;quot;&lt;/span&gt;: &lt;span style="color:#a31515;"&gt;&amp;quot;application/json; odata=verbose&amp;quot;&lt;/span&gt; }, success: onQuerySuccess, error: onQueryError });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;});&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, you need to write code to handle the success.&amp;#160; The results come back in JSON format, but unfortunately, they are buried in a hugely nested structure.&amp;#160; Each individual result can be found in &lt;strong&gt;data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results&lt;/strong&gt;.&amp;#160; Your best bet is to assign this a variable and then use a template or manually parse it. In my example, I am just going to use $.each to iterate through the results using brute force.&amp;#160; The individual columns of each search result can be found in &lt;strong&gt;this.Cells.results.Value&lt;/strong&gt;.&amp;#160; Ok, that’s confusing I am sure, so let’s look at the code and then step through it.&amp;#160; I’m just writing out a simple table by appending HTML tags to a div.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQuerySuccess(data) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $.each(results, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $.each(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.Cells.results, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Value + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Effectively, I have two nested loops.&amp;#160; One to iterate through each result and one for each managed property (column) in the results.&amp;#160; When you get inside the Cell, &lt;strong&gt;this.Value&lt;/strong&gt; will show the value of the result while &lt;strong&gt;this.Key&lt;/strong&gt; will contain the name of the managed property.&amp;#160; &lt;/p&gt;  &lt;p&gt;The last thing to implement is the code to handle errors.&amp;#160; It’s relatively simple and just writes &lt;strong&gt;error.StatusText&lt;/strong&gt; to the div.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQueryError(error) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(error.statusText)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;When I run my app, here is what it looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppDefault_6F6E297A.png"&gt;&lt;img title="SearchAppDefault" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SearchAppDefault" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppDefault_thumb_535D6A8F.png" width="361" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Executing a query in the app, gives us results but they aren’t pretty.&amp;#160; You can pretty them up yourself. :)&amp;#160; It also doesn’t include anything to print out the managed property names on the table.&amp;#160; You could get the names by looking at each cell of the first result and using &lt;strong&gt;this.Value&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppResults_2818D388.png"&gt;&lt;img title="SearchAppResults" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SearchAppResults" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchAppResults_thumb_4EE6E9C8.png" width="682" height="467" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can see, it’s really pretty easy to get started.&amp;#160; You can further refine your REST query to request specific fields, sort orders, and more.&amp;#160; I’ll probably write a follow-up post in the future to include some of those details. Here’s the whole source code for my example that you can work with.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; context = SP.ClientContext.get_current();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;$(document).ready(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; spAppWebUrl = decodeURIComponent(getQueryStringParameter(&lt;span style="color:#a31515;"&gt;&amp;#39;SPAppWebUrl&amp;#39;&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchButton&amp;quot;&lt;/span&gt;).click(&lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; queryUrl = spAppWebUrl + &lt;span style="color:#a31515;"&gt;&amp;quot;/_api/search/query?querytext=&amp;#39;&amp;quot;&lt;/span&gt; + $(&lt;span style="color:#a31515;"&gt;&amp;quot;#searchTextBox&amp;quot;&lt;/span&gt;).val() + &lt;span style="color:#a31515;"&gt;&amp;quot;&amp;#39;&amp;quot;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $.ajax({ url: queryUrl, method: &lt;span style="color:#a31515;"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;, headers: { &lt;span style="color:#a31515;"&gt;&amp;quot;Accept&amp;quot;&lt;/span&gt;: &lt;span style="color:#a31515;"&gt;&amp;quot;application/json; odata=verbose&amp;quot;&lt;/span&gt; }, success: onQuerySuccess, error: onQueryError });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;});&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQuerySuccess(data) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $.each(results, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $.each(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.Cells.results, &lt;span style="color:blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;td&amp;gt;&amp;#39;&lt;/span&gt; + &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Value + &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/td&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/tr&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;lt;/table&amp;gt;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; onQueryError(error) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; $(&lt;span style="color:#a31515;"&gt;&amp;quot;#resultsDiv&amp;quot;&lt;/span&gt;).append(error.statusText)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//function to get a parameter value by a specific key&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; getQueryStringParameter(urlParameterKey) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; params = document.URL.split(&lt;span style="color:#a31515;"&gt;&amp;#39;?&amp;#39;&lt;/span&gt;)[1].split(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;amp;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; strParams = &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;for&lt;/span&gt; (&lt;span style="color:blue;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; params.length; i = i + 1) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; singleParam = params[i].split(&lt;span style="color:#a31515;"&gt;&amp;#39;=&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (singleParam[0] == urlParameterKey)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;return&lt;/span&gt; decodeURIComponent(singleParam[1]);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;That’s all there is to it.&amp;#160; Hopefully, you find this example useful.&amp;#160; Thanks.&lt;/p&gt;  &lt;p&gt;The complete Visual Studio for this code snipped has also been uploaded to &lt;a href="http://code.msdn.microsoft.com/SharePoint-2013-Querying-623fd85a"&gt;MSDN Code Samples&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6261" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>Importing Search Configurations with SharePoint Apps</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/03/importing-search-configurations-with-sharepoint-apps.aspx</link><pubDate>Wed, 03 Apr 2013 16:21:44 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6255</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;The Office Developer Tools team snuck a new feature into the RTM version of the tools for Visual Studio 2012.&amp;#160; This new feature allows you to deploy apps and actually &lt;em&gt;alter the search schema on the host web&lt;/em&gt;.&amp;#160; That’s right.&amp;#160; You can deploy an app and it will directly change the search configuration on the host.&amp;#160; They just released &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/dn194077.aspx"&gt;documentation&lt;/a&gt; on it a while back, but as usual, I wanted to share my experiences.&amp;#160; That and I know you all like screenshots.&lt;/p&gt;  &lt;p&gt;What does this feature actually do?&amp;#160; Well let’s back up a bit.&amp;#160; If you remember back from my post, &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/07/17/what-you-need-to-know-about-search-in-sharepoint-2013-preview.aspx"&gt;Search is Everywhere&lt;/a&gt;, I mentioned the we now had the ability to export and import search settings.&amp;#160; This works at the SSA, site collection, and site level and allows you to move everything from result sources to managed properties from one environment to another.&amp;#160; This is big as it lets you finally promote search settings between environments and maintain a true SDLC when it comes to search.&amp;#160; Why do we care about search configuration with apps?&amp;#160; Well this allows the developer to package up search settings in Visual Studio 2012 and then move them to production without having to do manual steps or use PowerShell.&amp;#160; This also means you could include search settings in an app that you would put in the Office Store.&amp;#160; It certainly opens up possibilities.&lt;/p&gt;  &lt;p&gt;To test this out, go to your source site collection and customize your search settings.&amp;#160; In my example, I created a custom result source and some managed properties on our source site.&amp;#160; In my example, I actually did this on an on-premises installation of SharePoint 2013.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceSite1_5F4169CA.png"&gt;&lt;img title="SearchConfigurationResultSourceSite1" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchConfigurationResultSourceSite1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceSite1_thumb_11A53D4A.png" width="465" height="299" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This particular result source does nothing exciting.&amp;#160; It simply limits the search to documents, but it serves as a good example.&amp;#160; I’ve also created a managed property mapped to the Author crawled property.&amp;#160; You may already know about this part, but I am showing it for a reason.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationManagedPropertySite1_3FFEC2F7.png"&gt;&lt;img title="SearchConfigurationManagedPropertySite1" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchConfigurationManagedPropertySite1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationManagedPropertySite1_thumb_59D2F926.png" width="466" height="281" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, I am going to export my search settings of my site collection, by going to Site Settings –&amp;gt; Search –&amp;gt; Configuration Export.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettingsExport_1A0912A1.png"&gt;&lt;img title="SiteCollectionSearchSettingsExport" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SiteCollectionSearchSettingsExport" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettingsExport_thumb_0C36CCA6.png" width="209" height="199" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point, I could manually import the search settings using Configuration Import on another site collection.&amp;#160; However, we want to do this from an app.&amp;#160; Let’s get started in Visual Studio 2012.&amp;#160; Start by creating a new SharePoint-hosted app.&amp;#160; Once it is created, add an item to the project and choose &lt;em&gt;Search Configuration&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationSPI_4C6CE620.png"&gt;&lt;img title="VS2012SearchConfigurationSPI" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012SearchConfigurationSPI" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationSPI_thumb_2194820E.png" width="501" height="348" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next step will ask for the path to your configuration XML file that you exported.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationImportSettings_33DD48D0.png"&gt;&lt;img title="VS2012SearchConfigurationImportSettings" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012SearchConfigurationImportSettings" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationImportSettings_thumb_0D0F3290.png" width="475" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;At this point the process is done.&amp;#160; It will show you an XML editor with the contents of your search configuration.&amp;#160; According to the MSDN documentation, you then need to edit it and set the &lt;em&gt;DeployToParent&lt;/em&gt; element to &lt;em&gt;true&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationDeployToParentTrue_6236CE7D.png"&gt;&lt;img title="SearchConfigurationDeployToParentTrue" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchConfigurationDeployToParentTrue" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationDeployToParentTrue_thumb_3B68B83D.png" width="473" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We then need to grant permissions to access the Site Collection.&amp;#160; To do this, open &lt;strong&gt;AppManifest.xml &lt;/strong&gt;and then click on &lt;em&gt;Permissions&lt;/em&gt;.&amp;#160; On this tab, add a scope of &lt;em&gt;Site Collection&lt;/em&gt; and set the value to &lt;em&gt;Full Control&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationAppManifestPermissions_0DE7987A.png"&gt;&lt;img title="VS2012SearchConfigurationAppManifestPermissions" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012SearchConfigurationAppManifestPermissions" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationAppManifestPermissions_thumb_42F427AA.png" width="469" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point, we are are ready to deploy.&amp;#160; In my example, I am taking my search configuration and deploying it to an Office 365 SharePoint Online tenant.&amp;#160; When the app deployment completes, you’ll be prompted if you want to trust the app.&amp;#160; Trust it and then you should see your app start page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationDeploymentTrust_3CAD511C.png"&gt;&lt;img title="VS2012SearchConfigurationDeploymentTrust" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS2012SearchConfigurationDeploymentTrust" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS2012SearchConfigurationDeploymentTrust_thumb_2AD0BD4F.png" width="454" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;At this point, you are just going to see you default app start page.&amp;#160; There is nothing visible in the application.&amp;#160; Go to the Developer Site (or the site collection you deployed to) and go to the Site Settings.&amp;#160; Then look at the Result Sources.&amp;#160; If everything worked correctly, you should now see your new result source there.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceDeployed_0402A70F.png"&gt;&lt;img title="SearchConfigurationResultSourceDeployed" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchConfigurationResultSourceDeployed" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceDeployed_thumb_5D3490CE.png" width="456" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It was successfully deployed.&amp;#160; Now what about the managed property?&amp;#160; Unfortunately, it is no where to be found.&amp;#160; If you go back to Visual Studio and look at your XML, you’ll notice that your managed property definition is no where to be found there either.&amp;#160; If you check the source file before you imported it though, you’ll see the definition.&amp;#160; After I noticed this particular behavior, I reached out on Twitter and &lt;a href="http://twitter.com/chakkaradeep"&gt;@chakkaradeep&lt;/a&gt; reached out to me and told me that managed properties aren’t supported in this deployment model.&amp;#160; That made me kind of sad because that’s what I want to deploy the most.&amp;#160; I’m sure there is a technical reason though that he’ll explain to me sometime though.&amp;#160; You can still deploy managed properties via Configuration Import though which is still a great added feature of SharePoint 2013.&lt;/p&gt;  &lt;p&gt;You might be curious if the result source is removed when you uninstall the app.&amp;#160; It turns out that the changes are indeed removed when you uninstall.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceRemoved_1D6AAA49.png"&gt;&lt;img title="SearchConfigurationResultSourceRemoved" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchConfigurationResultSourceRemoved" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchConfigurationResultSourceRemoved_thumb_5DA0C3C3.png" width="397" height="264" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Aside from the managed properties not being available, this is still a pretty cool feature and it has me thinking about some new things I can do that I didn’t think were possible before.&amp;#160; I’m pretty excited to work with it more.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6255" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Online/default.aspx">SharePoint Online</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>Judging an IT department’s effectiveness by how long it takes to create a user account</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/02/judging-an-it-department-s-effectiveness-by-how-long-it-takes-to-create-a-user-account.aspx</link><pubDate>Tue, 02 Apr 2013 17:03:59 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6254</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As an IT consultant, I have seen it all (ok that’s a pretty big statement…I have seen a lot).&amp;#160; I often ask why does it take days, weeks, or even months to create a new user account?&amp;#160; Is it because there is so much process involved, your help desk or administrators are over-worked, or is it because someone in the chain is slacking?&amp;#160; Honestly, it could be any of this.&amp;#160; I find that watching how long it takes to create a user account is a good metric for an IT department’s efficiency.&amp;#160; You can see things from a business process and technical perspective by watching this process.&amp;#160; It shows how well the business process works to request and approve an account.&amp;#160; It can also expose any resourcing shortfalls that you may have.&amp;#160; In reality, the process of creating a new user account should really be simple.&amp;#160; Read more to look at possible causes of why it takes so long to create user accounts and for ways to improve it.&lt;/p&gt;  &lt;p&gt;If you’re reading this as a business user or executive and have been told the process of physically creating the account takes forever, prepare to get angry.&amp;#160; Watch this &lt;a href="http://www.youtube.com/watch?v=7v9997vDiXc"&gt;video&lt;/a&gt; and see how long the process actually takes.&amp;#160; This particular video (albeit old) is under two minutes and there is a lot of ramp up time.&amp;#160; &lt;em&gt;The process takes seconds.&lt;/em&gt;&amp;#160; I’ll give you that it might take a big longer if you are also configuring Exchange mailboxes (although minimal) or trying to decide on a username, but as you can see the process doesn’t take that long.&amp;#160; If your administrator tells you that this process takes a long time, he or she is lying and it’s time for him or her to go.&lt;/p&gt;  &lt;p&gt;Let’s look at the business process.&amp;#160; Obviously, you need to have some sort of approval process for creating accounts.&amp;#160; Your data is important.&amp;#160; You don’t want people requesting accounts for their friends or even worse a competitor.&amp;#160; Who needs to approve an account request?&amp;#160; Well from what I have seen in the past, typically someone from the business approves the request such as the requester’s manager, director, or VP.&amp;#160; You’ll probably also have someone from the IT department approve it as well.&amp;#160; Every organization is different, but if you have more than two or three approvals required to create an account, that is probably over-kill.&amp;#160; You definitely don’t want to have too many VP-level or C-level approvals required.&amp;#160; After all, most of them don’t really care nor do they have time to deal with your approval to begin with.&lt;/p&gt;  &lt;p&gt;For each approval you have, you can pretty much assume that is going to cost you a day at least.&amp;#160; A well-engineered process will use multiple approvers and have fall-backs for when approvers are not available.&amp;#160; It should also have task reminders to remind approvers to approve tasks after a set period of time.&amp;#160; What is not surprising is that the technology that powers this process widely varies in every organization and it is far from standardized.&amp;#160;&amp;#160; Typically, organizations manage this process inside their help-desk ticketing system.&amp;#160; I’ve also seen it put together in everything from an E-mail, a custom form, a Word document, you name it.&amp;#160; You could certainly build an approval workflow in SharePoint too. :)&amp;#160;&amp;#160; If it takes a long time to create a user account though, it is more than likely a business process problem and not a technology problem.&lt;/p&gt;  &lt;p&gt;It’s amazing how much money is lost because a new hire or contractor doesn’t have an account.&amp;#160; I see it all the time.&amp;#160; If I was the CFO, I would be yelling at you the CIO to get this process under control.&amp;#160; Of course, no one in their right mind would let me manage a company’s money. :)&amp;#160; Creating a user account should not take weeks and you know it.&amp;#160; So as the leader of an IT department, how do you fix it?&amp;#160; You need to figure out if it is a technology problem, a resource problem, or an approval problem.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Although I have never seen a help desk system that I would classify as great, I would rarely say it is a technology problem.&amp;#160; Still though, you can look at the process that the end user completes to get an account created.&amp;#160; This could be a form, an E-mail, logging in to the help desk system, or a phone call.&amp;#160; Make sure the process is obvious and make sure your users know how to get to it.&lt;/p&gt;  &lt;p&gt;Let’s look at potential resource problems.&amp;#160; Monitor how long the ticket sits with the person actually creating the user account as well as the number of other tickets.&amp;#160; If that administrator is being hit with 50 new tickets a day and he or she can’t keep up, then it’s probably a resource problem which ultimately means &lt;em&gt;it’s your fault&lt;/em&gt;.&amp;#160; Get that poor admin some help.&amp;#160; If the administrator only has a handful of tickets a day and doesn’t have any other responsibilities, you may be dealing with a slacker and you need to fix the problem.&amp;#160; Slackers are notoriously bad about making up excuses of why things take so long.&amp;#160; They use your ignorance in technology against you because as a non-techie you no means to question them.&amp;#160; Ask the slacker lots of questions and it usually becomes pretty obvious.&lt;/p&gt;  &lt;p&gt;You can find approval problems by looking at ticket history and examining the time in between approvals.&amp;#160; If you are seeing huge lags times in between approvers, you likely have too many required approvers or the wrong approvers.&amp;#160; Look and see if you see any trends where the process is getting hung up.&amp;#160; Interview people from your help desk about it because chances are one of them knows where the delays usually come from.&amp;#160; Think back to when the approval process was first created, does anyone there even remember why it was built the way it was?&amp;#160; Don’t be afraid to re-engineer the process from the beginning to simplify it.&amp;#160; Does the CIO or the VP of Legal really need to approve every account?&amp;#160; I’ve seen it before and it just really isn’t necessary.&amp;#160; Put a little more trust in your management to make the right decisions.&amp;#160; After all you hired them because they are good people and they just want to get work done.&lt;/p&gt;  &lt;p&gt;Lastly, separate the account creation process from the process to grant permissions to applications and files.&amp;#160; If the user is going to need access to sensitive files, often times you will want additional approvals.&amp;#160; Separate this from the account creation process so that the new employee can at least read E-mail and get started with his or her job.&amp;#160; Let the approvals for those sensitive areas come in on a separate ticket to expedite the process.&lt;/p&gt;  &lt;p&gt;I know there could be other factors in the mix such as dependencies on HRMS systems and the like.&amp;#160; What have you seen?&amp;#160; I know a lot of you out there are consultants and work with companies of varying sizes.&amp;#160; What are your experiences?&amp;#160; Do you have any good stories about starting somewhere?&amp;#160; Share them in your comments.&lt;/p&gt;  &lt;p&gt;I could be totally off base here.&amp;#160; I haven’t done any significant systems administration work in years, but I think these are good ideas.&amp;#160; As part of being a SharePoint architect, I am often working with business users to improve processes and this one almost always needs help.&amp;#160; Remember, nothing gives your IT department a worse name than being slow at executing such a rather simple process.&amp;#160; Perception is reality.&amp;#160; Fix this problem in your organization and you’ll get a big win with your stakeholders.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6254" width="1" height="1"&gt;</description></item><item><title>Configuring and using IRM with Office 365 and SharePoint Online</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/03/28/configuring-and-using-irm-with-office-365-and-sharepoint-online.aspx</link><pubDate>Thu, 28 Mar 2013 21:34:16 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6249</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;I’ve always founds IRM quite fascinating and the nice thing about Office 365 is that it is really easy to configure and use.&amp;#160; There are a few steps involved, but I managed to figure them out without having to go read a heap of documentation.&amp;#160; I thought I would share my experience here today so you know what’s possible.&amp;#160; This assumes you are on a new Office 365 tenant or one that has been upgraded already (not that any of mine have been. :) ).&amp;#160; I know this is only available in certain plans and I need to double-check which ones, but I haven’t had a chance yet.&amp;#160; If you set up a trial from &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/03/15/microsoft-partner-benefits-rocking-your-sharepoint-online-demos.aspx"&gt;MicrosoftOfficeDemos.com&lt;/a&gt;, you can definitely try it with that account.&lt;/p&gt;  &lt;p&gt;To configure IRM, it requires you turn it on in two places: in the Office 365 Portal and in SharePoint Online tenant administration.&amp;#160; Let’s start by going to the Office 365 Portal.&amp;#160; You can get there by clicking on &lt;em&gt;Admin &lt;/em&gt;–&amp;gt; &lt;em&gt;Office 365 &lt;/em&gt;at the top.&amp;#160; Then click on &lt;em&gt;Service Settings &lt;/em&gt;–&amp;gt; &lt;em&gt;Rights Management&lt;/em&gt;.&amp;#160; Rights Management is disabled by default, so you need to activate it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagement_64A8E61B.png"&gt;&lt;img title="Office365RightsManagement" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Office365RightsManagement" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagement_thumb_29E13D45.png" width="579" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On this screen simply click Manage and you will be taken to the Windows Azure Directory Rights Management site (notice the URL changes).&amp;#160; From here, you can start the activation process.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementDisabled_61B38168.png"&gt;&lt;img title="Office365RightsManagementDisabled" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Office365RightsManagementDisabled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementDisabled_thumb_39A0D249.png" width="485" height="168" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click the &lt;em&gt;Activate &lt;/em&gt;button and you’ll be taken to a screen to confirm.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementActivate_462E7F65.png"&gt;&lt;img title="Office365RightsManagementActivate" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Office365RightsManagementActivate" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementActivate_thumb_65712638.png" width="468" height="205" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click the &lt;em&gt;Activate&lt;/em&gt; button again and the process gets started.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementActivated_0851E7E9.png"&gt;&lt;img title="Office365RightsManagementActivated" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Office365RightsManagementActivated" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/Office365RightsManagementActivated_thumb_070D4F0A.png" width="513" height="172" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, you need to go your SharePoint tenant administration to activate it there.&amp;#160; Click on &lt;em&gt;Admin&lt;/em&gt; –&amp;gt; &lt;em&gt;SharePoint &lt;/em&gt;and then &lt;em&gt;Settings&lt;/em&gt;.&amp;#160; In the middle of the page, look for the Information Rights Management (IRM) section and check &lt;em&gt;Use the IRM service specified in your configuration&lt;/em&gt;.&amp;#160; Then click &lt;em&gt;Refresh IRM Settings&lt;/em&gt;.&amp;#160; Now, it takes a few minutes for your activation to take effect in the Office 365 Portal so if you click on this too early, you are likely to see the following error.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Error: RMS Online is configured for this tenant but is turned off, please turn on in Office 365 to enable.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SharePointOnlineRightsManagementNotActivated_7A9F2BE0.png"&gt;&lt;img title="SharePointOnlineRightsManagementNotActivated" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SharePointOnlineRightsManagementNotActivated" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SharePointOnlineRightsManagementNotActivated_thumb_4B6D4049.png" width="696" height="93" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Keep trying and after a few minutes, it should activate.&amp;#160; Be sure and click &lt;em&gt;Save&lt;/em&gt; when you are done.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SharePointOnlineRightsManagementActivated_4A28A76A.png"&gt;&lt;img title="SharePointOnlineRightsManagementActivated" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SharePointOnlineRightsManagementActivated" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SharePointOnlineRightsManagementActivated_thumb_50034B03.png" width="698" height="91" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point, you can actually try things out inside office.&amp;#160; I’m working off of the demo sites that I mentioned earlier.&amp;#160; Now, one thing to point out is that Office uses whatever account you are signed in with to determine which Rights Management Server to connect to.&amp;#160; Therefore, if you are using a test Office 365 account, you need to actually, log into Office with that account.&amp;#160; Simply click on your name in the top right and click Switch Account.&amp;#160; If you don’t do this, it may time out or try to connect to another RMS server like the one at your company.&lt;/p&gt;  &lt;p&gt;To try things out, open up a document on your SharePoint server, click &lt;em&gt;File&lt;/em&gt; and then click &lt;em&gt;Protect Document &lt;/em&gt;and then &lt;em&gt;Restrict Access&lt;/em&gt;.&amp;#160; The first time you choose this, there is an option to connect to rights management services.&amp;#160; Once it connects, you’ll see options on protecting the document.&amp;#160; We’re going to go with &lt;em&gt;Restricted Access&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WordRestrictAccess_20D15F6C.png"&gt;&lt;img title="WordRestrictAccess" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="WordRestrictAccess" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WordRestrictAccess_thumb_3412160B.png" width="522" height="577" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the next screen, you will be prompted to assign who can view the document or edit the document.&amp;#160; In my example, I am going to grant read permission to Sara Davis.&amp;#160; I simply typed in her full Office 365 Id.&amp;#160; This means she will be able to open the document and view it, but cannot save or print it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMRestrictPermission_527C56F4.png"&gt;&lt;img title="IRMRestrictPermission" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="IRMRestrictPermission" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMRestrictPermission_thumb_6A338E5A.png" width="439" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you click on &lt;em&gt;More Options&lt;/em&gt;, you’ll get a window where you can set even more granular permissions such as expiring the document, allowing printing, as well as an E-mail address that gets used to request additional permissions.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMAdvancedPermissions_56A62EB9.png"&gt;&lt;img title="IRMAdvancedPermissions" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="IRMAdvancedPermissions" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMAdvancedPermissions_thumb_2E937F9A.png" width="381" height="412" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once we are finished, save the document back to SharePoint.&amp;#160; Now, when Sara opens the document, she is going to get a different experience.&amp;#160; To test using the document with Sara, I have to sign in to SharePoint with her account.&amp;#160; I also have to open Office and sign out with Garth and sign in with Sara’s account.&amp;#160; Here’s what it looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMPermissionReadOnly_185D6448.png"&gt;&lt;img title="IRMPermissionReadOnly" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="IRMPermissionReadOnly" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMPermissionReadOnly_thumb_3733D826.png" width="603" height="433" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Office informs me that access is restricted and if I click &lt;em&gt;View Permission&lt;/em&gt;, it will show me what I am allowed to do.&amp;#160; Notice I can only view the document.&amp;#160; If I try to access the document with a user who does not have access granted through IRM, Office tells me I can’t open the document like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMPermissionDenied_6A8F9B82.png"&gt;&lt;img title="IRMPermissionDenied" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="IRMPermissionDenied" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/IRMPermissionDenied_thumb_694B02A3.png" width="722" height="106" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When a document is protected with IRM, Office Web Apps will be unable to show a preview of the document’s contents.&amp;#160; Here’s what it looks like when that happens.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WordWebAppBlockedIRM_47EB5D07.png"&gt;&lt;img title="WordWebAppBlockedIRM" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="WordWebAppBlockedIRM" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WordWebAppBlockedIRM_thumb_2DAAF3E3.png" width="321" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I really like how easy it is to get started with IRM in Office 365.&amp;#160; If you have an interest in this feature, check it out today.&amp;#160; It’s definitely much easier to get started with it here than it is on-premises.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6249" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/IRM/default.aspx">IRM</category></item><item><title>Determining the most popular items in a document library in SharePoint 2013</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/03/28/determining-the-most-popular-items-in-a-document-library-in-sharepoint-2013.aspx</link><pubDate>Thu, 28 Mar 2013 19:39:39 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6248</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;With the combination of &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/07/17/what-you-need-to-know-about-search-in-sharepoint-2013-preview.aspx"&gt;analytics and search&lt;/a&gt; in SharePoint 2013, there is a heap of new features to help determine which content is actually being used.&amp;#160; No longer is this information buried in reports for administrators, but it in fact is available right from the ribbon in a document library.&amp;#160; Maybe you have even noticed the &lt;em&gt;Most Popular Items&lt;/em&gt; button in the ribbon already.&amp;#160; You can find it on the library tab in the middle.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentLibraryMostPopularItemsRibbonButton_36C6C038.png"&gt;&lt;img title="DocumentLibraryMostPopularItemsRibbonButton" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="DocumentLibraryMostPopularItemsRibbonButton" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentLibraryMostPopularItemsRibbonButton_thumb_123532B4.png" width="493" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click on it and you will be taken to a custom search results screen that shows you recent views and total views.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MostPopularItemsReport_6AFAE97E.png"&gt;&lt;img title="MostPopularItemsReport" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MostPopularItemsReport" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MostPopularItemsReport_thumb_7CD77D4B.png" width="551" height="405" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What’s nice is that you can even search and refine within the report if you are looking for something specific.&amp;#160; You can also click on the &lt;em&gt;Popularity Trends&lt;/em&gt; link to get a nice graph of the usage of the file over time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PopularityTrendsReportExcel_3177D987.png"&gt;&lt;img title="PopularityTrendsReportExcel" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PopularityTrendsReportExcel" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PopularityTrendsReportExcel_thumb_70D58D17.png" width="548" height="451" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Behind the scenes, this report is powered by the &lt;em&gt;Popular&lt;/em&gt; result source.&amp;#160; You can also use this source to look for popular items across your entire index.&amp;#160; As a developer, the possibilities are quite interesting.&lt;/p&gt;  &lt;p&gt;My particular tenant doesn’t have a ton of usage, but if you’re already running SharePoint 2013 you might be able to extract some valuable insights from this report.&amp;#160; Try it out today.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6248" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Document+Library/default.aspx">Document Library</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Online/default.aspx">SharePoint Online</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>Microsoft Partner Benefits: Rocking your SharePoint Online demos</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/03/15/microsoft-partner-benefits-rocking-your-sharepoint-online-demos.aspx</link><pubDate>Fri, 15 Mar 2013 15:51:11 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6231</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;If you haven’t heard, Microsoft released a &lt;a href="https://www.microsoftofficedemos.com/"&gt;new site&lt;/a&gt; recently that allows you to create a new Office 365 tenant that is pre-populated with users, content, and social data.&amp;#160; It even comes with demo scripts that you can use to walk users through the new features of SharePoint Online.&amp;#160; What’s the catch?&amp;#160; Your Windows Live ID must be affiliated with a Microsoft Partner and you need to have plenty of time to wait for it to provision.&amp;#160; It typically takes between 8 and 36 hours for the provisioning process to complete.&amp;#160; Tenants are created in trial mode and you have 30 days that you can use it for free.&amp;#160; After that, you can either pay for licenses or simply request a new tenant.&amp;#160; This isn’t necessarily a bad thing, because the sample social data expires after 14 days.&amp;#160; If you want to demonstrate social, it’s really just easier to get a new tenant.&lt;/p&gt;  &lt;p&gt;Even if you work for a partner and a lot of you out there do, I found that a lot of people aren’t affiliated with their company’s partner Id.&amp;#160; So if you click on the Microsoft Partner link and it gives you an error, you need to affiliate yourself with your company’s partnership.&amp;#160; I’ve given a few colleagues this &lt;a href="https://partners.microsoft.com/partnerprogram/OrganizationSelect.aspx?BrowserCheck=true"&gt;link&lt;/a&gt; to associate themselves and it appears to have worked for them.&amp;#160; Let me know if you have an issue with it.&lt;/p&gt;  &lt;p&gt;When you are ready to create a new tenant, go to the &lt;a href="https://www.microsoftofficedemos.com/Provision.aspx"&gt;Create Demo&lt;/a&gt; page.&amp;#160; This page is a bit confusing because all of the options are disabled. Just click &lt;em&gt;Create Your Demo&lt;/em&gt; to proceed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosProvisionStep1_30C2C4CF.png"&gt;&lt;img title="MODDemosProvisionStep1" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosProvisionStep1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosProvisionStep1_thumb_3775CE52.png" width="457" height="306" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On this page, you specify your region, tenant name, and E-mail address.&amp;#160; You’ll get an E-mail when the process completes with the URL and login information.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosProvisionStep2_29375562.png"&gt;&lt;img title="MODDemosProvisionStep2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosProvisionStep2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosProvisionStep2_thumb_69013BE7.png" width="518" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;After you fill in your information, click &lt;em&gt;Create My Account&lt;/em&gt; and start waiting.&amp;#160; This is an excellent time to review some of the demo scripts out there.&amp;#160; Click the &lt;em&gt;Resources&lt;/em&gt; link at the top and you’ll see demo scripts broken up by product.&amp;#160; This is also an excellent time to go ahead and stop reading this article and get your tenant provisioning.&amp;#160; You can come back and read more once you get it started. :)&lt;/p&gt;    &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosScripts_4F9938AD.png"&gt;&lt;img title="MODDemosScripts" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosScripts" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosScripts_thumb_480DC940.png" width="426" height="287" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;When the process completes, you will receive an e-mail with the login and password.&amp;#160; Click on that link to begin exploring.&amp;#160; However, for most of the demos they recommend a demo user, Garth Fort.&amp;#160; The login for this user will be &lt;strong&gt;garthf@tenantname.onmicrosoft.com&lt;/strong&gt;.&amp;#160; The password should be the same for all accounts &lt;strong&gt;pass@word1&lt;/strong&gt;.&amp;#160; Keep that in mind.&amp;#160; You may want to change the default passwords of your accounts.&amp;#160; If you look at the users section, you will see a number of user accounts have been created for you.&amp;#160; It even includes things like conference rooms.&amp;#160; These users have pictures and completed user profiles and even social data which we’ll see later.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosUsers_0E1E8654.png"&gt;&lt;img title="MODDemosUsers" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosUsers" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosUsers_thumb_1F22B437.png" width="510" height="457" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m going to focus on SharePoint content, so click on the Admin link at the top and choose SharePoint.&amp;#160; When you go to the SharePoint Online administration tenant, you’ll see that it creates a number of site collections.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSiteCollections_0CD9ED75.png"&gt;&lt;img title="MODDemosSiteCollections" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosSiteCollections" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSiteCollections_thumb_4CA3D3FA.png" width="498" height="346" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Although it’s fairly obvious.&amp;#160; Here’s a quick summary of what’s in the site collections.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Root (/)&lt;/strong&gt; – Demo landing page.&amp;#160; Links to the various site assets and demo scripts for SharePoint&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/Search&lt;/strong&gt; – Search Center&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/BICenter&lt;/strong&gt; – Demos using Power View and Visio Services&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/Communities&lt;/strong&gt; – fully populated community sites with discussion boards&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/Contoso&lt;/strong&gt; – main Intranet site&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/ContosoBeta – &lt;/strong&gt;no content&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/eDiscovery&lt;/strong&gt; – discovery center&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;/sites/KnowledgeCenter &lt;/strong&gt;– knowledge center with custom branding&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;What I like about these demos is that there is a lot of examples of what SharePoint can do and a lot of the features are really highlighted.&amp;#160; I’ll take you through some of the pages so you have an idea of what you can expect.&amp;#160; When you go to the root of your tenant, you’ll see a landing page with links to the demo home page, assets, and scripts.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSharePointLanding_25698AC5.png"&gt;&lt;img title="MODDemosSharePointLanding" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosSharePointLanding" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSharePointLanding_thumb_7305B745.png" width="492" height="358" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A good starting place is the Demo Home Page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosHomePage_443FFEA3.png"&gt;&lt;img title="MODDemosHomePage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosHomePage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosHomePage_thumb_5714824D.png" width="664" height="350" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now is a great time to start exploring the site.&amp;#160; What I like is a lot of the sites demonstrate out-of-the-box features.&amp;#160; Take a look at the Engineering Department site.&amp;#160; They have an example of showing reports with Power View using Excel Services.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosEngineering_0180B36B.png"&gt;&lt;img title="MODDemosEngineering" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosEngineering" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosEngineering_thumb_20572749.png" width="682" height="383" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If we look at the Sales and Marketing site, it has some nice examples of KPIs, the PowerPoint viewer as well as documents that have been rated.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSalesMarketing_7FCFE796.png"&gt;&lt;img title="MODDemosSalesMarketing" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosSalesMarketing" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSalesMarketing_thumb_340410DD.png" width="684" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you’re looking to tell a story about BI, click on the Report Dashboard link on the left.&amp;#160; There is a good example of a Power View sheet with filters and maps.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSalesMarketingReportDashboard_3397DDE8.png"&gt;&lt;img title="MODDemosSalesMarketingReportDashboard" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosSalesMarketingReportDashboard" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSalesMarketingReportDashboard_thumb_3DE90248.png" width="681" height="487" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One of my favorite sections of the demo is the Communities section.&amp;#160; It’s a great example of using social and shows off the gamification concepts quite well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunities_52021ED1.png"&gt;&lt;img title="MODDemosCommunities" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosCommunities" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunities_thumb_115FD262.png" width="624" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Going to one of the communities, you’ll see active discussion boards with top contributors.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunityProductIdeas_03215972.png"&gt;&lt;img title="MODDemosCommunityProductIdeas" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosCommunityProductIdeas" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunityProductIdeas_thumb_20B33471.png" width="677" height="481" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can view individual discussions to show how users interact with each other.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunityProductIdeasExample_66C3F184.png"&gt;&lt;img title="MODDemosCommunityProductIdeasExample" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosCommunityProductIdeasExample" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosCommunityProductIdeasExample_thumb_4CEFBB55.png" width="555" height="482" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I think the social aspects are some of the best things to demo.&amp;#160; If you click on the Newsfeed link, you’ll find quite a bit of activity.&amp;#160; Just keep in mind this information will expire after two weeks so it’s good to keep a fresh tenant when you’re doing a demo.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeed_25493F2B.png"&gt;&lt;img title="MODDemosNewsfeed" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosNewsfeed" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeed_thumb_7DA2C300.png" width="712" height="491" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the screenshot above, you’ll see posts from users that Garth is following as well as various things the user has posted or followed.&amp;#160; That video can be watched directly from the newsfeed too.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedVideo_643ABFC6.png"&gt;&lt;img title="MODDemosNewsfeedVideo" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosNewsfeedVideo" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedVideo_thumb_3C94439C.png" width="451" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Clicking on one of the tags such as #CSAT will show you all of the posts that have used that particular hash tag.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedHashtag_0DCE8AFA.png"&gt;&lt;img title="MODDemosNewsfeedHashtag" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosNewsfeedHashtag" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedHashtag_thumb_0238CDBB.png" width="462" height="355" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are good examples of the user being mentioned by other people as well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedMentions_21E7A783.png"&gt;&lt;img title="MODDemosNewsfeedMentions" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosNewsfeedMentions" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewsfeedMentions_thumb_1A5C3816.png" width="471" height="446" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Search demos extremely well with SharePoint Online because Office Web Apps is included and running.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSearchExample_67F86496.png"&gt;&lt;img title="MODDemosSearchExample" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosSearchExample" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosSearchExample_thumb_3932ABF4.png" width="749" height="538" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When doing a demonstration, you can show the hover panel on search results with the preview of the document.&amp;#160; I especially like showing users how you can jump directly to a specific section of a document.&amp;#160; You’ll also notice how you can filter by Tags or Content Type.&lt;/p&gt;  &lt;p&gt;The MOD demos also provide a working eDiscovery center, but I don’t think there is a link to it so you’ll have to type the URL in yourself.&amp;#160; This is a great way to show examples of how SharePoint can place holds on SharePoint and Exchange content.&amp;#160; If you look at one of the open cases (i.e.: CT77A11), you can define a discovery set.&amp;#160; You’ll need to login as the admin account to do this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewDiscoverySet_2D9CEEB5.png"&gt;&lt;img title="MODDemosNewDiscoverySet" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosNewDiscoverySet" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosNewDiscoverySet_thumb_5156164F.png" width="625" height="431" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you look at the sources, you can see I have added a few Exchange mailboxes as well as a SharePoint site.&amp;#160; Clicking on the Preview Results button will show you content from both Exchange and SharePoint based on the filters you provided.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosDiscoverySetPreviewResults_3F0D4F8D.png"&gt;&lt;img title="MODDemosDiscoverySetPreviewResults" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosDiscoverySetPreviewResults" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosDiscoverySetPreviewResults_thumb_7ED73612.png" width="536" height="458" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Everything comes back in these results, so remember your mailbox can always be seen by someone. :)&lt;/p&gt;  &lt;p&gt;The BI Center is pretty slick as well.&amp;#160; Take a look at the Custom Satisfaction Dashboard.&amp;#160; This is a great example of combining graphs with Power View and adding a social aspect that people can comment on.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosBICenter_7E6B031D.png"&gt;&lt;img title="MODDemosBICenter" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosBICenter" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosBICenter_thumb_6FC05738.png" width="729" height="457" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The last thing I will point out is the Knowledge Center.&amp;#160; Here is a great example of how they really changed the way content looks in SharePoint.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosKnowledgeCenter_363D4741.png"&gt;&lt;img title="MODDemosKnowledgeCenter" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MODDemosKnowledgeCenter" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MODDemosKnowledgeCenter_thumb_6279CE25.png" width="727" height="510" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;Of course, there is plenty of content out there for you to explore.&amp;#160; If you can’t sell someone on the value of SharePoint with these demos, you’re doing something wrong. :)&amp;#160; Get out there and try it out today (or tomorrow when it finishes provisioning).&amp;#160; Here’s the link again for you to get started.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://www.microsoftofficedemos.com/"&gt;MicrosoftOfficeDemos.com&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6231" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Online/default.aspx">SharePoint Online</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office/default.aspx">Office</category></item><item><title>Installing SharePoint 2013 apps with PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/28/installing-sharepoint-2013-apps-with-powershell.aspx</link><pubDate>Thu, 28 Feb 2013 17:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6216</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;My PowerShell posts always prove to be the most popular.&amp;#160; I showed all sorts of cool PowerShell tricks in my talk back at SPC12.&amp;#160; One of the things I covered was how to install and manage apps using PowerShell.&amp;#160; Since there is a corporate catalog and SharePoint store, you might not think you need to install apps with PowerShell, but your developers may choose to the app model for a future internal project, so as an IT Pro you need to know how to install the thing.&amp;#160; There are a lot of similarities to working with solution packages but there are several differences to be aware of.&amp;#160; The documentation on TechNet is pretty good, but putting it all together can be tricky. &lt;/p&gt;  &lt;p&gt;Specific to PowerShell, there is some terminology to familiarize yourself with.&amp;#160; You’ll see these for parameter names so you need to know what they are otherwise you’ll find yourself confused.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;App Package – physical file containing the app (.app file)&lt;/li&gt;    &lt;li&gt;App – an instance of an app installed on a particular subsite&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Along with the App, you’ll find an Id property that refers to a GUID of that particular app instance.&amp;#160; We’ll talk about that more when it comes to updates.&lt;/p&gt;  &lt;p&gt;To begin installing app, we first install the .app file into a site collection and then we deploy the app to an individual subsite.&amp;#160; To install the app package, we use &lt;a href="http://technet.microsoft.com/en-us/library/jj219734(v=office.15).aspx"&gt;Import-SPAppPackage&lt;/a&gt;.&amp;#160; Specify the path to your app package (.app file) with the &lt;em&gt;–Path &lt;/em&gt;parameter.&amp;#160; You’ll also need to specify which Site Collection will contain the app using the –&lt;em&gt;Site&lt;/em&gt; parameter.&amp;#160; Finally, the &lt;em&gt;Source&lt;/em&gt; parameter tells SharePoint where the app came from (SharePoint Store, Corporate Catalog, or Object Model).&amp;#160; I always specify a value of &lt;em&gt;ObjectModel&lt;/em&gt; for my custom apps.&amp;#160; Here’s what the command looks like.&amp;#160; Assign the results of the command to variable so that you can use it in the next step.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$spapp = Import-SPAppPackage -Path .\spcdemoapp.app -Site &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; –Source ObjectModel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppImportSPAppPackage_5C8C8D2E.png"&gt;&lt;img title="PowerShellAppImportSPAppPackage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppImportSPAppPackage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppImportSPAppPackage_thumb_7A8A9B22.png" width="592" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can always add &lt;em&gt;–confirm:$false &lt;/em&gt;to avoid getting prompted.&lt;/p&gt;  &lt;p&gt;Now you have the AppPackage installed, you can deploy an instance of it to a subsite using &lt;a href="http://technet.microsoft.com/en-us/library/jj219537(v=office.15).aspx"&gt;Install-SPApp&lt;/a&gt;.&amp;#160; You’ll need to provide a URL to the subsite using the –&lt;em&gt;Web&lt;/em&gt; parameter and a reference to the imported app package.&amp;#160; That’s why we saved the results of the last command into $spapp.&amp;#160; Use the following command.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Install-SPApp -Web &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://server/sitecollection/site"&gt;http://server/sitecollection/site&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; -Identity $spapp&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppInstallApp_519F8619.png"&gt;&lt;img title="PowerShellAppInstallApp" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppInstallApp" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppInstallApp_thumb_17441038.png" width="591" height="65" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Like always with PowerShell, no news is good news.&amp;#160; At this point, you should find the app installed on the Site Contents pages.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppInstalled_7C97741E.png"&gt;&lt;img title="NewAppInstalled" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="NewAppInstalled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppInstalled_thumb_4D658887.png" width="244" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s what it looks like it is running.&amp;#160; This is mainly for reference when we start talking about updates.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppDefaultPage_4BB4BCB3.png"&gt;&lt;img title="NewAppDefaultPage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="NewAppDefaultPage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppDefaultPage_thumb_713E3A14.png" width="360" height="258" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;To determine what apps are installed on a particular subsite use &lt;a href="http://technet.microsoft.com/en-us/library/jj219678(v=office.15).aspx"&gt;Get-SPAppInstance&lt;/a&gt;.&amp;#160; This cmdlet can be executed three different ways.&amp;#160; You need the id of the App Instance to update, export, or remove it.&amp;#160;&amp;#160; So often you combine it with a Where-Object command to get a reference to an app instance by name instead of by id.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Get-SPAppInstance -web http://server/sitecollection/site | Where-Object { $_.Title -eq &amp;quot;MyApp&amp;quot; }&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppGetSPAppInstance_4F726183.png"&gt;&lt;img title="PowerShellAppGetSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppGetSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppGetSPAppInstance_thumb_06D872B2.png" width="592" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you have a reference to the App Instance, removing the app from a subsite is easy with &lt;a href="http://technet.microsoft.com/en-us/library/jj219643.aspx"&gt;Uninstall-SPAppInstance&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Uninstall-SPAppInstance -Identity $instance&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUninstallSPAppInstance_72067A31.png"&gt;&lt;img title="PowerShellAppUninstallSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppUninstallSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUninstallSPAppInstance_thumb_42685BA5.png" width="596" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One nice feature of PowerShell is that you have the ability to export an installed app to a .app file using &lt;a href="http://technet.microsoft.com/en-us/library/jj219603(v=office.15).aspx"&gt;Export-SPAppPackage&lt;/a&gt;.&amp;#160; It takes a parameter named &lt;em&gt;-App&lt;/em&gt;.&amp;#160; It expects the value from an instance called .App (so use Get-SPAppInstance as shown above).&amp;#160; You also want to specify where to save the file using the &lt;em&gt;–Path&lt;/em&gt; parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Export-SPAppPackage –App $instance.App –Path .\ExportApp.app&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppExportSPAppPackage_209C8314.png"&gt;&lt;img title="PowerShellAppExportSPAppPackage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppExportSPAppPackage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppExportSPAppPackage_thumb_46260075.png" width="599" height="187" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When it comes to updating apps, that’s where things get a bit tricky.&amp;#160; Here is what you need to do:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Get a reference to the existing installed instance using Get-SPAppInstance shown earlier&lt;/li&gt;    &lt;li&gt;Import the new app package with Import-SPAppPackage&lt;/li&gt;    &lt;li&gt;Use &lt;a href="http://technet.microsoft.com/en-us/library/jj219631(v=office.15).aspx"&gt;Update-SPAppInstance&lt;/a&gt; with a reference to the imported app package and the existing instance&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here are the commands&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Get-SPAppInstance -web http://server/sitecollection/site | Where-Object { $_.Title -eq &amp;quot;MyApp&amp;quot; }&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$spappv2 = Import-SPAppPackage -Path .\myapp.app -Site http://server/sitecollection/site -Source ObjectModel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Update-SPAppInstance – Identity $instance –App $spappv2&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUpdateSPAppInstance_7D1FDEAE.png"&gt;&lt;img title="PowerShellAppUpdateSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppUpdateSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUpdateSPAppInstance_thumb_425835D8.png" width="602" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One thing you might have noticed by now is that there is no way to retrieve which app packages are installed nor is there any way to remove them using PowerShell.&amp;#160; This is a bit different than the way we deal with solution packages.&amp;#160; I suspect it cleans itself up, but I’m really not sure.&amp;#160; I hope these PowerShell commands prove to be useful to you.&amp;#160; Let me know if you run into any issues.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6216" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>Creating SharePoint lists with Excel data using Access 2013</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/28/creating-sharepoint-lists-with-excel-data-using-access-2013.aspx</link><pubDate>Thu, 28 Feb 2013 16:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6215</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;It’s not uncommon for users to want to move data from an Excel spreadsheet into a new SharePoint list.&amp;#160; There have been various techniques to achieve this, but Access 2013 provides a way to this pretty easily.&amp;#160; The process is pretty simple.&amp;#160; We create a new Access 2013 database and import the Excel data.&amp;#160; From there, we export it to SharePoint.&amp;#160; Let’s look at the process.&amp;#160; First, let’s take a look at my data in Excel.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelDefaultData_67631B64.png"&gt;&lt;img title="ExcelDefaultData" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="ExcelDefaultData" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelDefaultData_thumb_53D5BBC3.png" width="528" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To import it to SharePoint, start by creating a new blank Access 2013 database.&amp;#160; The name doesn’t matter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessNewBlankDatabase_617851FE.png"&gt;&lt;img title="AccessNewBlankDatabase" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessNewBlankDatabase" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessNewBlankDatabase_thumb_5BBD3858.png" width="428" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, we need to import the data from our Excel Spreadsheet.&amp;#160; This is a multi-step wizard process but it isn’t too complicated.&amp;#160; Go to the &lt;em&gt;External Data&lt;/em&gt; tab and then click the &lt;em&gt;Excel&lt;/em&gt; button under &lt;em&gt;Import &amp;amp; Link&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExternalDataExcelImportButton_19D6530A.png"&gt;&lt;img title="AccessExternalDataExcelImportButton" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessExternalDataExcelImportButton" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExternalDataExcelImportButton_thumb_7876AD6D.png" width="383" height="241" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On this step, browse to the path of your Excel file.&amp;#160; I typically use the Import option, but you could use Append, or Link depending on your needs.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessGetExternalDataExcel_2F708BA7.png"&gt;&lt;img title="AccessGetExternalDataExcel" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessGetExternalDataExcel" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessGetExternalDataExcel_thumb_6D89A658.png" width="592" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the next step, you’ll be prompted for details about the data in your spreadsheet. You’ll get a preview of your data.&amp;#160; It’s ideal if the first row of your spreadsheet has the column names.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard_7629FEE4.png"&gt;&lt;img title="AccessImportSpreadsheetWizard" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessImportSpreadsheetWizard" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard_thumb_5053D881.png" width="599" height="421" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the next step, you can tweak the data types used in each column.&amp;#160; This is important to ensure SharePoint sets the types for the columns appropriately.&amp;#160; You’ll notice the format of your dates comes through weird but it will be ok in the end.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard2DataTypes_192A4A88.png"&gt;&lt;img title="AccessImportSpreadsheetWizard2DataTypes" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessImportSpreadsheetWizard2DataTypes" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard2DataTypes_thumb_30754EF9.png" width="607" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On this step, you can specify a primary key or create a new one.&amp;#160; I’m not sure if SharePoint pays attention to this or not when the list is created.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard3PrimaryKey_31010BE1.png"&gt;&lt;img title="AccessImportSpreadsheetWizard3PrimaryKey" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessImportSpreadsheetWizard3PrimaryKey" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard3PrimaryKey_thumb_1A5EBD9A.png" width="606" height="425" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Finally, you can confirm the name of the table you want to create.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard4Name_1EF4C854.png"&gt;&lt;img title="AccessImportSpreadsheetWizard4Name" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessImportSpreadsheetWizard4Name" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessImportSpreadsheetWizard4Name_thumb_246338F8.png" width="604" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point the data is now visible inside Access as you can see below.&amp;#160; Now, we want to create the SharePoint list using this data.&amp;#160; Under the Export section, click &lt;em&gt;More&lt;/em&gt; and choose &lt;em&gt;SharePoint List&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExportToSharePointList_699B9021.png"&gt;&lt;img title="AccessExportToSharePointList" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessExportToSharePointList" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExportToSharePointList_thumb_52F941DA.png" width="618" height="344" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, a new wizard will guide you through importing the data in SharePoint.&amp;#160; First, you will need to provide the URL to the site as well as the name of the list.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExportToSharePointListWizard_37743FD7.png"&gt;&lt;img title="AccessExportToSharePointListWizard" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="AccessExportToSharePointListWizard" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/AccessExportToSharePointListWizard_thumb_3CE2B07B.png" width="620" height="456" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When it finishes, you’ll now see your data in SharePoint.&amp;#160; You’ll notice it provides it to you in a grid view that you can immediately begin editing.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelImportedList_3AC5B1B2.png"&gt;&lt;img title="ExcelImportedList" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="ExcelImportedList" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelImportedList_thumb_38A8B2E9.png" width="629" height="241" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It seems to do a pretty good job of mapping to appropriate SharePoint column types as well.&amp;#160; Take a look and note how it used types of Single line of text, Date and Time, Number, and Currency.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelListDataTypes_50320873.png"&gt;&lt;img title="ExcelListDataTypes" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ExcelListDataTypes" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelListDataTypes_thumb_21D882C6.png" width="472" height="345" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Keep in mind this is only an import process.&amp;#160; The data is not synchronized.&amp;#160; That means this will behave differently than taking an existing list and clicking the Export to Excel button.&amp;#160; This seems like a pretty simply way to get data from Excel into SharePoint.&amp;#160; I like it because it creates the list for you with little effort and it maps the data types for you.&amp;#160; Do you find this useful?&amp;#160; How do you import data from Excel?&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6215" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Access/default.aspx">Access</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Excel/default.aspx">Excel</category></item><item><title>Why I chose Surface RT over Surface Pro</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/14/why-i-chose-surface-rt-over-surface-pro.aspx</link><pubDate>Thu, 14 Feb 2013 21:09:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6178</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>14</slash:comments><description>&lt;p&gt;I take my Surface RT everywhere and I do mean everywhere.&amp;nbsp; Whether it is lunch, the bar, the airplane, user group presentation, a client demo, if I am out and about, chances are I have my Surface RT with me.&amp;nbsp; In the past month or so (long before the Surface Pro) came out, I noticed this trend of people asking me if that was a Surface Pro.&amp;nbsp; After I sighed,&amp;nbsp; I would reply “No, it’s not and nor do I want one.”&amp;nbsp; The technology just isn’t there yet for us to not have to make a trade-off right now.&amp;nbsp; Today’s post is to explain why I chose what I did.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;If you look at the &lt;a href="http://www.microsoft.com/Surface/en-US/which-surface-is-right-for-you"&gt;Help Me Choose&lt;/a&gt; page, most of my reasons are clear.&amp;nbsp; Let’s break it down.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ARM Processors&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;While uneducated reviewers out there are complaining about the Surface RT running on an ARM processor, I am praising it.&amp;nbsp; When I first heard that Windows was going to support ARM, I knew the significance.&amp;nbsp; This is what gives you a tablet device with no fan speed or heat concerns.&amp;nbsp; It also gives you ridiculously long battery life and connected standby.&amp;nbsp; I’ve used a Samsung Series 7 slate and it was heavy and sometimes loud.&amp;nbsp; I saw the issue back then and I knew this was the answer. I’m a big fan of ARM. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Battery Life&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Seriously, the battery life on Surface RT is amazing.&amp;nbsp; They quote 8 hours, but I have used it all day at client meetings exclusively and then used it a couple of hours later at the bar and still had 20% left.&amp;nbsp; I am seriously impressed.&amp;nbsp; The Surface Pro unfortunately has significantly less battery life with reports between 3.5 and 5 hours.&amp;nbsp; This may be fine if you plan on using it as a laptop and you’re keeping it plugged in but I like the fact that I never have to worry about power on my Surface RT.&amp;nbsp; I charge it every other day typically and that is fine.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Connected Standby&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is the feature that makes your Windows RT device notify you of mail and other notifications when the device is “sleeping”.&amp;nbsp; That means I hear every mail that comes in and I get that Skype call (usually) just like an iPad does.&amp;nbsp; Surface Pro cannot do this because it goes into a true sleep just like your laptop does.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Instant Resume&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Who has three seconds to wait for their device to come on every time they hit the button on top of it?&amp;nbsp; You do, if you bought Surface Pro.&amp;nbsp; I can turn the screen of my Surface RT on and off rapidly.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Apps&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt; I am amazed at how many reviewers, said “ZOMG, the Surface RT can’t run Photoshop!”.&amp;nbsp; Really?&amp;nbsp; You’re dismissing the device because of this?&amp;nbsp; How many times have you ran Photoshop on your iPad?&amp;nbsp; And why would you run that on a tablet anyways?&amp;nbsp; I get it.&amp;nbsp; The Windows Store is still growing, but you can rest assure it will catch up to Apple and it’s five thousand fart apps.&amp;nbsp; The install base of Windows PCs, Tablets, and other devices is just to huge to ignore.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;When I think of this, I refer back to my post, &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/04/16/there-s-an-app-for-that-but-should-there-be.aspx"&gt;&amp;quot;There’s an app for that, but does there need to be?”&lt;/a&gt;&amp;nbsp; No, there is not a Facebook app for Windows 8, but do I need one?&amp;nbsp; The reason they created one for mobile devices originally was the because the browser sucked.&amp;nbsp; Well, I don’t need one because I have a fully functional web browser on the device (you can debate whether you like it or not :) ).&amp;nbsp; When you use your laptop, do you wish there was a Facebook app there?&amp;nbsp; No, of course not.&lt;/p&gt;  &lt;p&gt;For you power users out there, you can actually run some of your favorite desktop apps over remote desktop. I don’t mean inside a full screen window session.&amp;nbsp; I mean with Remote Apps which puts applications running on a remote server running seamlessly on your desktop.&amp;nbsp; In fact, right now I am typing this entire post using Windows Live Writer running off of a Windows Azure VM on my Surface RT.&amp;nbsp; Take a look at the screenshot below and notice how there isn’t any visible RDP window or anything like that.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_7765CDF7.png"&gt;&lt;img width="649" height="366" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_thumb_0944F276.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So yes, that’s Visual Studio and Windows Live Writer running on my Surface RT desktop over RDP.&amp;nbsp; It works quite well (assuming you have an Internet connection).&amp;nbsp; Special thanks to &lt;a href="http://twitter.com/chakkaradeep"&gt;@chakkaradeep&lt;/a&gt; for pointing out the &lt;a href="http://www.daveamenta.com/2012-11/using-remoteapps-on-surface-rt-windows-rt/"&gt;post&lt;/a&gt; on this.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;I even have a RemoteApp set up for Outlook.&amp;nbsp; Yes, I agree the included Mail app is a bit painful.&amp;nbsp; Really, my main complaint about it is that it’s slow and unresponsive.&amp;nbsp; I’m hoping that will get better in the future.&amp;nbsp; However, you have to understand why that app exists.&amp;nbsp; It all comes back to Connected Standby.&amp;nbsp; Outlook doesn’t support it, so they built this app that does.&amp;nbsp; Sure, it could support it one of these days I am guessing, but it’s all a matter of priorities.&amp;nbsp; Outlook definitely isn’t touch friendly.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The Surface RT is already a significant investment at it’s price point.&amp;nbsp; With better hardware comes more cost of course.&amp;nbsp; In reality, it’s not much more than any previous slate devices based on an i5 processor.&amp;nbsp; You just have to decide what’s in your price range.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What about Surface Pro’s better hardware?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Like anything there is a trade-off.&amp;nbsp; Yes, the higher resolution display and pen would be nice, but I could do without for now.&amp;nbsp; Admittedly, I haven’t seen that display in person yet.&amp;nbsp; I think the feature gap between the two devices will get closer as time goes on.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Can Surface RT replace your laptop?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Sometimes!&amp;nbsp; When I am traveling, it’s often all I bring with me.&amp;nbsp; If I have a SharePoint demo, I try to use SharePoint Online or I will remote into my laptop or another server so it gets the job done.&amp;nbsp; I don’t write a ton of code any more so it’s ok that I don’t have Visual Studio running locally.&amp;nbsp; With RemoteApps though, you can see that you can work around it.&amp;nbsp; Take a look at this photo that I took before traveling a few weeks ago.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WP_000453_5C8FC227.jpg"&gt;&lt;img width="544" height="409" title="WP_000453" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="WP_000453" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/WP_000453_thumb_25B56DE1.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There you will see my Surface RT connected to a glowing USB hub (SharePoint branded) with a keyboard, mouse, and headset.&amp;nbsp; It’s also attached to a second monitor driving it at full resolution as a second screen.&amp;nbsp; Here I have a remote desktop connected to my laptop.&amp;nbsp; I’m getting actual work done.&amp;nbsp; Let’s see your iPad do that.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Can Surface RT replace your iPad?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;At the risk of enraging the wrath of Apple fanbois, I’ll give you my opinion.&amp;nbsp; If you want to get real work done, absolutely.&amp;nbsp; If you want it to control your Sonos system or Directv receiver, not likely.&amp;nbsp; For work though, there really is no comparison.&amp;nbsp; Think back in the past to a meeting you have gone to right after someone you know first got their iPad.&amp;nbsp; They are over there diligently trying to use the iPad in some useful way at work.&amp;nbsp; Then, you see that person a few weeks later at another meeting and one of two things has happened.&amp;nbsp; Either a) they didn’t bring the iPad or b) you peak on their screen and they are on Facebook or are playing Angry Birds.&amp;nbsp; iPads are pretty decent for consumer home use, but for most people they aren’t going to help you get your job done.&lt;/p&gt;  &lt;p&gt;Let’s face it Apple hasn’t done much since Steve Jobs died.&amp;nbsp; I am hearing even the most die hard fans question their direction and capability to innovate.&amp;nbsp; Simply making things thinner and lighter isn’t good enough for people.&amp;nbsp; I think the Surface RT is superior to other devices in many ways.&amp;nbsp; Does it have it’s issues?&amp;nbsp; Sure, but this is&amp;nbsp;Microsoft’s market to capture.&amp;nbsp; Unfortunately, the marketing Microsoft is doing is just not effective so people just don’t know about what these devices do.&amp;nbsp; When the word gets out, maybe we’ll see something.&lt;/p&gt;  &lt;p&gt;What do you all think?&amp;nbsp; Am I completely off base here?&amp;nbsp; Does the RT meet your needs?&amp;nbsp; Did you hold out for the Pro or did you go with something else?&amp;nbsp; Leave your feedback.&lt;/p&gt;  &lt;p&gt;Maybe I should have been a gadget reviewer for a living.&amp;nbsp; If anyone wants to send me hardware for me to write my opinion about, I’ll take it. :)&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6178" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Product+Review/default.aspx">Product Review</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Windows+8/default.aspx">Windows 8</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Surface/default.aspx">Surface</category></item><item><title>Slides from my Publishing SharePoint Apps talk from Austin SharePoint Users Group</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/14/slides-from-my-publishing-sharepoint-apps-talk-from-austin-sharepoint-users-group.aspx</link><pubDate>Thu, 14 Feb 2013 19:32:39 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6175</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I had a great time last night at the Austin SharePoint Users Group (&lt;a href="http://twitter.com/AustinSPUG"&gt;@AustinSPUG&lt;/a&gt;).&amp;#160; We had a great turnout and we had a good discussion of what the publication process looks like with SharePoint 2013 Apps in the Office Store.&amp;#160; Austin has a very friendly group of people.&amp;#160; Never had I had so many people come up and thank me afterwards for speaking.&amp;#160; Now, it makes me look forward to speaking at &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/12/speaking-in-austin.aspx"&gt;SharePoint Saturday Austin&lt;/a&gt; on 3/2.&amp;#160; As promised, my slides are attached and are available on SlideShare.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.slideshare.net/CoreyRoth/publishing-share-point-2013-apps-to-the-office-store-austin-sharepoint-users-group-2013"&gt;Publishing SharePoint 2013 Apps to the Office Store&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6175" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>Speaking in Austin</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/12/speaking-in-austin.aspx</link><pubDate>Tue, 12 Feb 2013 17:35:07 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6172</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;The great thing about living in Texas is that there is three SharePoint users groups less than three hours away from me.&amp;#160; I’m excited to have the opportunity to be speaking in Austin twice in the next couple weeks.&amp;#160; The first talk is tomorrow night (2/13 at 6:00 pm) at the &lt;a href="http://t.co/R9cmhSMv"&gt;Austin SharePoint Users Group&lt;/a&gt; (&lt;a href="http://twitter.com/AustinSPUG"&gt;@AustinSPUG&lt;/a&gt;) where I’ll be speaking about my experience publishing SharePoint 2013 Apps to the Office Store.&amp;#160; It’s at the &lt;a href="http://www.bing.com/maps/Default.aspx?encType=1&amp;amp;v=2&amp;amp;ss=ypid.YN860x401213082&amp;amp;style=r&amp;amp;mkt=en-us&amp;amp;FORM=LLDP"&gt;Microsoft office&lt;/a&gt; in Austin.&amp;#160; &lt;/p&gt;  &lt;p&gt;Then, I’ll be making a return trip on 3/2 for &lt;a href="http://www.sharepointsaturday.org/austin/default.aspx"&gt;SharePoint Saturday Austin&lt;/a&gt; (&lt;a href="http://twitter.com/spsatx"&gt;@SPSATX&lt;/a&gt;) at the Etter-Harbin Alumni Center (&lt;a href="http://binged.it/11hjpwY"&gt;Map&lt;/a&gt;).&amp;#160; There, I’ll be talking about new development features in Visual Studio 2012.&amp;#160; This talk will cover features that developers can take advantage of for both SharePoint 2010 and SharePoint 2013.&amp;#160; I’m looking forward to seeing everyone.&amp;#160; See you there!&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6172" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Saturday/default.aspx">SharePoint Saturday</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Perform a SharePoint 2013 site collection upgrade with PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/04/how-to-perform-a-sharepoint-2013-site-collection-upgrade-with-powershell.aspx</link><pubDate>Mon, 04 Feb 2013 23:11:30 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6153</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;At &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/26/speaking-at-sharepoint-conference-2012.aspx"&gt;SPC12&lt;/a&gt;, I gave a talk about PowerShell in SharePoint 2013.&amp;#160; In that talk I upgraded a SharePoint 2010 site collection to SharePoint 2013.&amp;#160; I wanted to follow-up with a blog post showing the steps involved.&amp;#160; To begin the process, I have restored a copy of my content database from my SharePoint 2010 environment on the SQL Server for my SharePoint 2013 environment.&amp;#160; The first thing we need to do is mount the content database with &lt;a href="http://technet.microsoft.com/en-us/library/ff607581.aspx"&gt;Mount-SPContentDatabase&lt;/a&gt;. In SharePoint 2010, this process would actually update the database and perform the upgrade.&amp;#160; Now, it actually just attaches the database but leaves the site running in SharePoint 2010 mode.&amp;#160; Effectively you are running a full copy of SharePoint 2010 inside SharePoint 2013.&amp;#160; You can do this and upgrade each site collection one at a time to make the transition process a bit easier.&amp;#160; &lt;/p&gt;  &lt;p&gt;Typically, when you are doing this, you’ll execute &lt;a href="http://technet.microsoft.com/en-us/library/ff607941.aspx"&gt;Test-SPContentDatabase&lt;/a&gt; first and resolve any reported issues.&amp;#160; Just like in SharePoint 2010, you need to install all of your customizations via solution package prior to mounting.&amp;#160; &lt;em&gt;Test-SPContentDatabase&lt;/em&gt; can help you find some of these customizations if they are missing.&amp;#160; For simplicity, I am going to leave that out of my example today.&amp;#160; &lt;em&gt;Mount-SPContentDatabase&lt;/em&gt; typically takes two parameters:&amp;#160; the name of the database and the URL of the Web Application to bind it to.&amp;#160; Here is what the command looks like.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Mount-SPContentDatabase –Name DatabaseName –WebApplication &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When it runs, you’ll see a progress indicator.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseProgress_1A34E577.png"&gt;&lt;img title="MountSPContentDatabaseProgress" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MountSPContentDatabaseProgress" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseProgress_thumb_07EC1EB5.png" width="506" height="82" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When it finishes, you’ll likely have errors.&amp;#160; You can track them down and re-mount.&amp;#160; More than likely you’ll always have some kind of error regardless of how hard you try.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseCompleteWithErrors_19C8B282.png"&gt;&lt;img title="MountSPContentDatabaseCompleteWithErrors" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MountSPContentDatabaseCompleteWithErrors" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseCompleteWithErrors_thumb_2BA5464F.png" width="510" height="183" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you can go to the site in your web browser.&amp;#160; You’ll see your existing site running in SharePoint 2010 mode along with a banner prompting to start the site collection upgrade process.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeSharePoint2010Mode_4B542017.png"&gt;&lt;img title="UpgradeSharePoint2010Mode" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradeSharePoint2010Mode" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeSharePoint2010Mode_thumb_66F8AC0D.png" width="617" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can start the upgrade process right there in the browser, but we want to use PowerShell.&amp;#160;&amp;#160; We can see the upgrade status of our site collections using &lt;a href="http://technet.microsoft.com/en-us/library/ff607950.aspx"&gt;Get-SPSite&lt;/a&gt;.&amp;#160; This cmdlet has been updated to show you the current version (ComaptibilityLevel) of the site collection.&amp;#160; A value of 14 represents SharePoint 2010 while a value of 15 represents SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPSite&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPSite_1FA3561B.png"&gt;&lt;img title="PowerShellGetSPSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellGetSPSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPSite_thumb_317FE9E8.png" width="512" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To upgrade a site collection, test it out first using &lt;a href="http://technet.microsoft.com/en-us/library/fp161259.aspx"&gt;Test-SPSite&lt;/a&gt;.&amp;#160; Like &lt;em&gt;Test-SPContentDatabase&lt;/em&gt;, this command can help you identify any particular issues.&amp;#160; In my case, I am going to upgrade my root site collection.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Test-SPSite &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellTestSPSite_3832F36B.png"&gt;&lt;img title="PowerShellTestSPSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellTestSPSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellTestSPSite_thumb_5F0109AB.png" width="511" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2013 has a new concept for the upgrade evaluation site collection.&amp;#160; Effectively this process schedules a job to copy your site collection, upgrade it, and then optionally notify you (if you add the –email parameter).&amp;#160; You don’t have to use this, but it’s a good way to test things out if you have a tricky site with a lot of customizations.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Request-SPUpgradeEvaluationSite http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Executing the command simply returns you to a command prompt.&amp;#160; Later a job will fire off and create the upgrade evaluation site collection.&amp;#160; This appears to be controlled by the &lt;em&gt;Create Upgrade Evaluation Site Collections job&lt;/em&gt;.&amp;#160; It only executes once a day so if you want to get your upgrade evaluation site faster, you can go manually run it.&amp;#160; After it completes, you can visit your site by appending –eval to your site collection name (i.e.: http://server/sitecollection-eval).&amp;#160; When you visit the site you’ll notice the warning bar at the top telling users that this is only temporary.&amp;#160; After 30 days or so the site will get deleted automatically.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeEvaluationSiteCollection_37C6C076.png"&gt;&lt;img title="UpgradeEvaluationSiteCollection" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradeEvaluationSiteCollection" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeEvaluationSiteCollection_thumb_7E43B07E.png" width="595" height="346" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you see I have an error in a web part that I need to correct.&amp;#160; This is why upgrade site collections can be useful in finding issues before cutting over.&lt;/p&gt;  &lt;p&gt;Let’s upgrade out site collection directly now.&amp;#160; I only received warnings from &lt;em&gt;Test-SPSite &lt;/em&gt;so I am going to proceed with the upgrade and assume everything is going to work fine. :)&amp;#160; We use &lt;a href="http://technet.microsoft.com/en-us/library/fp161257.aspx"&gt;Upgrade-SPSite&lt;/a&gt; to make this happen.&amp;#160; Pass the URL to the site collection and be sure and include &lt;em&gt;–VersionUpgrade&lt;/em&gt;.&amp;#160; It won’t upgrade to the new version if you leave off that parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Upgrade-SPSite &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; –VersionUpgrade&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteInProgress_16D34DCF.png"&gt;&lt;img title="PowerShellUpgradeSPSiteInProgress" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellUpgradeSPSiteInProgress" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteInProgress_thumb_0FB41157.png" width="521" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Depending on the size of your site collection, it may take some time.&amp;#160; When it finishes, you’ll see something similar to the screen below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteComplete_646F7A4F.png"&gt;&lt;img title="PowerShellUpgradeSPSiteComplete" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellUpgradeSPSiteComplete" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteComplete_thumb_485EBB64.png" width="525" height="61" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, we can visit our upgraded site in the browser.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradedSiteCollection_6F2CD1A4.png"&gt;&lt;img title="UpgradedSiteCollection" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradedSiteCollection" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradedSiteCollection_thumb_5CE40AE2.png" width="596" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Site Collections Upgrades are a powerful new feature in SharePoint 2013 which I believe will really make the process smoother.&amp;#160; Keep in mind, you can also use the new &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/10/21/copying-site-collections-with-powershell-in-sharepoint-2013-preview.aspx"&gt;Copy-SPSite&lt;/a&gt; cmdlet to make a copy of your site collection and perform some tests there.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6153" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Upgrade/default.aspx">SharePoint Upgrade</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>User Group DOs and DON’Ts</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/25/user-group-dos-and-don-ts.aspx</link><pubDate>Fri, 25 Jan 2013 16:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6132</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;As someone who has been a member, presenter, officer and board member of various user groups, I&amp;#39;ve come up with some observations on what makes a great user group. I would never call myself an expert on the subject (I reserve that for &lt;a href="http://twitter.com/victor_chat"&gt;@Victor_Chat&lt;/a&gt;), but I think this is some good advice.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO encourage and participate in a SharePint&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Yes, I&amp;#39;m actually listing this first. More of the connections and relationships happen here than when mingling before the group. Attendees get the opportunity to let loose and it&amp;#39;s a great way to get to know people.&amp;#160; If you have questions, this is where you get them answered.&amp;#160; The &lt;a href="http://h-spug.org/SitePages/Home.aspx"&gt;Houston SharePoint Users Group&lt;/a&gt; (HSPUG) does this right. It&amp;#39;s not uncommon to see 40+ people at one of our SharePints. We actually have sponsors for it. :)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO delegate&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Some of the smaller groups tend to have one or two people that do everything. Ask for help and you will likely get it. There are usually people willing to help out. People can help with everything from signing people in to ordering food. If you&amp;#39;re a member and want to help out, don&amp;#39;t be afraid to ask what you can do.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO encourage new speakers&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You don&amp;#39;t need big name speakers to have a good user group. Encourage new speakers to present to the group. When I was at &lt;a href="http://www.tulsasharepoint.com/default.aspx"&gt;Tulsa&lt;/a&gt;, we encouraged new speakers at every session.&amp;#160; It was usually pretty effective.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO seek out officers from diverse backgrounds&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It&amp;#39;s great to have officers from different backgrounds. Employ a healthy mix of consultants and non-consultants. Do this even if the officers work for a competitor. It shows that you aren&amp;#39;t trying to dominate the user group with your company.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO encourage others to meet up outside of the user group&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is something Houston is playing around with. We live in a large city and are encouraging members to get together throughout the month at a local bar or restaurant. We&amp;#39;re still judging the success on this as I think it&amp;#39;s yet to establish it&amp;#39;s rhythm yet.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO post your topics early&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This sounds easy in theory but now that I have been involved with a few groups, I know it&amp;#39;s not. Ideally, you want to line up multiple speakers months in advance. It is great if you can have these posted to the web site, include them in your communications, and even announce the next topics during each meeting.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DO engage in social media&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Some groups do this better than others. Although probably less than 10% of your user group is on twitter, it&amp;#39;s still a good way to remind users about what is going on throughout the month.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DON&amp;#39;T be afraid to ask questions&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As a member, don&amp;#39;t be afraid to ask questions of the presenter, the officers, or other members. Chances are there are users there that face the same challenges as you.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DON&amp;#39;T use vendor spotlights in place of presentations&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Although it&amp;#39;s great to support your sponsors, your users are there to learn, not to be sold to. It&amp;#39;s ok, to let a vendor spend two minutes before a presentation and say hey thanks for letting us sponsor. However, it should never be used as a replacement for finding a speaker. Your users don&amp;#39;t like this and it will drive them away from the group. Most user groups allow the vendor to set up a table and buy beers afterwards. This is more effective for them than giving a full-blown sales presentation.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DON’T sell your member list&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We have vendors asking for the contact info of our members all the time.&amp;#160; The answer to that request always is unequivocally NO.&amp;#160; It is absolutely unacceptable to sell your members out like that.&amp;#160; They expect some you to have some degree of ethics and decorum and not to sell their information away.&amp;#160; If you run an ISV, under no circumstances should you ever send out a marketing E-mail from your company using the user group’s E-mail list.&amp;#160; I’ve seen this happen and it makes me sick.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DON&amp;#39;T use the user group to promote your business&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I attended a user group once where the self-promotion was so bad it made me sick. The first words out of your mouth shouldn&amp;#39;t be about your company. The best officers I have seen have never even mentioned where they work once in front of the group. Your members will only tolerate this for so long before they stop coming. I&amp;#39;ve seen this nearly destroy groups before. It&amp;#39;s ok to talk about your company afterwards over a beer. However, it&amp;#39;s unacceptable to spend 15 minutes before the meeting talking about your company. Plus, this severely cripples sponsorship opportunities.&amp;#160; As someone promoting your own business, you would never allow a competitor to sponsor.&amp;#160; Plus, your competitors aren’t going to want to sponsor a corrupt user group anyways.&amp;#160; Just don’t do it.&lt;/p&gt;  &lt;p&gt;I remember one time in Houston, where someone did a 10 minute case study on a solution they built. Some of the members felt it was a bit salesy and were about to run them out the door. In reality, I didn&amp;#39;t think it was salesy at all. The presenters were developers not account managers. However, you always have to be careful when doing case studies because they can come off as a sales pitch if you’re not careful.&lt;/p&gt;  &lt;p&gt;Make your sales the old-fashioned way by playing golf, buying beers, and going to expensive dinners.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I may have bragged a little bit about my user group, but hey, it’s pretty awesome.&amp;#160; Seriously, if you’re ever in town the third Wednesday of the month, you should make a point to attend. :)&amp;#160; Hopefully, you find some of this information helpful.&amp;#160; What tips do you have for user groups?&amp;#160; Leave a comment and let me know.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6132" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/User+Groups/default.aspx">User Groups</category></item><item><title>Workaround for freezes in Client Web Part Editor in Visual Studio 2012</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/10/workaround-for-freezes-in-client-web-part-editor-in-visual-studio-2012.aspx</link><pubDate>Thu, 10 Jan 2013 15:55:36 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6110</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;If you have tried to do any work with SharePoint 2013 Client Web Parts with the &lt;a href="http://msdn.microsoft.com/en-us/office/apps/fp123627.aspx"&gt;Office Developer Tools Preview 2&lt;/a&gt; in Visual Studio 2012, you know it’s an exercise in frustration.&amp;#160; It literally locks up every three or four lines of code you try to type.&amp;#160; When it does this, it will freeze for ten seconds or more.&amp;#160; This occurs when you are editing the page associated with the web part.&amp;#160; It’s a total productivity killer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12ClientWebPartFreeze_3A3497B5.png"&gt;&lt;img title="VS12ClientWebPartFreeze" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS12ClientWebPartFreeze" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12ClientWebPartFreeze_thumb_48333B18.png" width="399" height="378" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It finally bugged me enough that I started looking for a solution.&amp;#160; I was pretty close to switching to notepad.&amp;#160; Luckily, I found a quick work-around by launching a different text editor.&amp;#160; To launch another editor, right click on your web part page in the Solution Explorer and choose &lt;strong&gt;Open With…&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12ClientWebPartOpenWith_7F994C46.png"&gt;&lt;img title="VS12ClientWebPartOpenWith" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS12ClientWebPartOpenWith" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12ClientWebPartOpenWith_thumb_33614298.png" width="311" height="232" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Choose &lt;strong&gt;Source Code (Text) Editor&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12OpenWithEditorList_393BE631.png"&gt;&lt;img title="VS12OpenWithEditorList" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="VS12OpenWithEditorList" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/VS12OpenWithEditorList_thumb_4A401414.png" width="365" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This editor is similar to the Web Form Editor but it won’t lock up.&amp;#160; You will lose IntelliSense and AutoComplete.&amp;#160; However, I’d gladly close my own div tag to not have the editor lock up every ten seconds.&amp;#160; The HTML is still color coded at least, but the JavaScript is not.&amp;#160; Your JavaScript should be in a separate file anyways though. :)&amp;#160; If you have been experiencing this issue, I hope this helps.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6110" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Sort search results by query string with the ResultScriptWebPart in SharePoint 2013</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/09/how-to-sort-search-results-by-query-string-with-the-resultscriptwebpart-in-sharepoint-2013.aspx</link><pubDate>Wed, 09 Jan 2013 20:21:09 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6107</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>5</slash:comments><description>&lt;p&gt;By now you may have noticed that Search has &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/07/17/what-you-need-to-know-about-search-in-sharepoint-2013-preview.aspx"&gt;changed&lt;/a&gt; quite a bit in SharePoint 2013. The &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.webcontrols.resultscriptwebpart.aspx"&gt;ResultScriptWebPart&lt;/a&gt; powers most of the magic behind the Search Center.&amp;#160; It replaces the CoreResultsWebPart that we have been using since SharePoint 2007.&amp;#160; I expected many things in it to operate the same, but this web part really has been rewritten from the ground up and that’s a good thing.&amp;#160; One new feature (of many) it brings us is the ability to sort search results.&amp;#160; You can specify a sort order in the query or by enabling it in the web part properties.&amp;#160; This allows the user to pick from a list of properties.&amp;#160; I’ll cover it in the future because it deserves a quick post.&amp;#160; However, for you developers out there, I know that some of you will want to write some code that passes a sort order.&amp;#160; This post explains how to do it.&lt;/p&gt;  &lt;p&gt;Before we begin, you have to know what you can sort of.&amp;#160; There are a lot of options out-of-the-box such as &lt;em&gt;Author &lt;/em&gt;and &lt;em&gt;Write &lt;/em&gt;(Modified Date) or you can use your own property.&amp;#160; Whatever you choose, you need to check the managed properties page and make sure it has the Sortable option set to &lt;em&gt;Yes - active&lt;/em&gt;.&amp;#160; You do this from the Search Schema page on your site collection or Search Service Application.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchManagedPropertySortable_3D3865F7.png"&gt;&lt;img title="SearchManagedPropertySortable" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchManagedPropertySortable" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchManagedPropertySortable_thumb_3CCC3302.png" width="414" height="91" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Since SharePoint 2007, we have been able to pass a query using &lt;a href="http://msdn.microsoft.com/en-us/library/ee558911.aspx"&gt;KQL&lt;/a&gt; using the “k” parameter to the results.aspx of your search center.&amp;#160; We can still do this in SharePoint 2013.&amp;#160; To add a sort order though, we do things a little differently.&amp;#160; Using a new query string parameter called &lt;em&gt;Default, &lt;/em&gt;we can pass in a number of properties including sort order.&amp;#160; The format is quite a bit different though as it uses a JSON notation.&amp;#160; To start, I am going to issue a query with out k parameter using this new JSON notation.&amp;#160; Let’s do a search for our sales documents.&amp;#160; To do this, I include my search center URL (&lt;em&gt;/search/pages/results.aspx&lt;/em&gt;) and append &lt;em&gt;#Default=&lt;/em&gt;&amp;#160; to it followed by the JSON object with a name value pair &lt;em&gt;{&amp;quot;k&amp;quot;:&amp;quot;Sales&amp;quot;}&lt;/em&gt;.&amp;#160; When I assemble to entire string, it looks something like this.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;http://server/search/Pages/results.aspx#Default={&amp;quot;k&amp;quot;:&amp;quot;Sales&amp;quot;}&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSales_3855B23B.png"&gt;&lt;img title="SearchResultsSales" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchResultsSales" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSales_thumb_09FC2C8E.png" width="514" height="449" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now we want to add sorting.&amp;#160; To do that, we use the “o” parameter.&amp;#160; It takes a collection of JSON objects.&amp;#160; The parameter &lt;em&gt;p &lt;/em&gt;represents the managed property to sort by and the value &lt;em&gt;d &lt;/em&gt;is the sort direction specified as a 0 or 1.&amp;#160; A value of 0 represents ascending and a value of 1 represents descending.&amp;#160; For example to sort by modified date descending, we use the &lt;em&gt;Write&lt;/em&gt; managed property.&amp;#160; The string would look like this: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;quot;o&amp;quot;:[{&amp;quot;d&amp;quot;:1,&amp;quot;p&amp;quot;:&amp;quot;Write&amp;quot;}]&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When we add it to our query string from above it looks like this.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;http://server/search/Pages/results.aspx#Default={&amp;quot;k&amp;quot;:&amp;quot;Sales&amp;quot;,&amp;quot;o&amp;quot;:[{&amp;quot;d&amp;quot;:1,&amp;quot;p&amp;quot;:&amp;quot;Write&amp;quot;}]}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSalesWriteDescending_305E0FD9.png"&gt;&lt;img title="SearchResultsSalesWriteDescending" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchResultsSalesWriteDescending" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSalesWriteDescending_thumb_2FF1DCE4.png" width="529" height="444" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This shows us the newest documents.&amp;#160; In SharePoint 2013, they moved the modified date to the InfoCard so you actually have to hover over a search result to see the date.&amp;#160; To show the oldest documents, you would just specify &lt;em&gt;d:&amp;#39;”0”&lt;/em&gt; instead.&amp;#160; &lt;/p&gt;  &lt;p&gt;As another example, we could also sort by &lt;em&gt;Author&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;http://server/search/Pages/results.aspx#Default={&amp;quot;k&amp;quot;:&amp;quot;Sales&amp;quot;,&amp;quot;o&amp;quot;:[{&amp;quot;d&amp;quot;:0,&amp;quot;p&amp;quot;:&amp;quot;Author&amp;quot;}]}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSalesOrderByAuthorWithInfoCard_617D4A79.png"&gt;&lt;img title="SearchResultsSalesOrderByAuthorWithInfoCard" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchResultsSalesOrderByAuthorWithInfoCard" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchResultsSalesOrderByAuthorWithInfoCard_thumb_6E772A8A.png" width="611" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’ve included a bigger screenshot where you can see the name of the first author in the list on the InfoCard.&lt;/p&gt;    &lt;p&gt;We can also combine them to have multiple sort orders, but I have had mixed results with that so far.&amp;#160; Here’s what the query string would an example look like though.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;http://server/search/Pages/results.aspx#Default={&amp;quot;k&amp;quot;:&amp;quot;Sales&amp;quot;,&amp;quot;o&amp;quot;:[{&amp;quot;d&amp;quot;:0,&amp;quot;p&amp;quot;:&amp;quot;Write&amp;quot;},{&amp;quot;d&amp;quot;:1,&amp;quot;p&amp;quot;:&amp;quot;Author&amp;quot;}]}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’m pretty excited about sorting functionality in the search center.&amp;#160; Users have been wanting it for quite a long time and only a select few ever had it (those with FAST Search for SharePoint).&amp;#160; If you are writing search solutions, be sure and check my post about &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-sort-search-queries-in-sharepoint-2013.aspx"&gt;sorting with the REST API&lt;/a&gt;.&amp;#160; This technique works with both SharePoint 2013 on-premises as well as SharePoint Online Preview.&amp;#160; All of the screenshots came from Office 365.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6107" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Preview/default.aspx">Office 365 Preview</category></item><item><title>No metadata? No problem!  Custom entity extraction in SharePoint 2013</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/08/no-metadata-no-problem-custom-entity-extraction-in-sharepoint-2013.aspx</link><pubDate>Tue, 08 Jan 2013 16:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6103</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>11</slash:comments><description>&lt;p&gt;Every organization wants better search results.&amp;#160; However, few have actually spent the time to create file plans, content types, and managed properties to make it happen.&amp;#160; SharePoint 2013 has a feature called entity extraction though that can actually infer values by comparing what it finds in the body of the document to a dictionary.&amp;#160; This feature is Entity Extraction.&amp;#160; If you are familiar with FAST Search for SharePoint or FAST ESP, you know that entity extraction is nothing new.&amp;#160; What it does is gives you the power to infer the values of managed properties in search without having metadata in your site columns.&amp;#160; FS4SP and SharePoint 2013 come with an extraction dictionaries for company names out-of-the-box.&amp;#160; This means when it crawls it will search the contents of the body of your documents and if it recognizes any companies it knows, you can then search and refine on it.&amp;#160; However, the true value comes when you create your own.&amp;#160; SharePoint 2013 makes it really easy to create these custom dictionaries.&amp;#160; &lt;/p&gt;  &lt;p&gt;Let me give you a few more examples to help you really understand the significance.&amp;#160; Most companies have a concept of a department or business unit.&amp;#160; We can create a dictionary with all of the company’s departments such as Accounting, Human Resources, IT, Operations, etc.&amp;#160; With entity extraction, if it finds a document and somewhere the text “Human Resources Organization Chart” is found, it then sets the value of the managed property to Human Resources.&amp;#160; Now, when the user does an advanced search and says “show me all Human Resources documents”, that result comes back with more confidence.&amp;#160; By using the extraction dictionary, we get better results that just using a regular keyword search.&amp;#160; Now you may be wondering that’s nothing special, but we can also add other terms, for example, I could add “HR”, and “Benefits” to that dictionary as well and map them to the Human Resources department.&amp;#160; Once I have a property defined like this, I can combine it with others as well.&amp;#160; This will let us issue queries like “show me all documents from Human Resources with a document type of Policy”.&amp;#160; &lt;/p&gt;  &lt;p&gt;As another example, you could pre-load SharePoint with a dictionary of product names.&amp;#160; For those of you in the energy industry, you could pre-populate it with a list of wells or names of leases.&amp;#160; Are you starting to see the significance?&amp;#160; In previous versions of SharePoint, we had to set site columns in our document libraries to capture these values either from the user or programmatically.&amp;#160; Now with the right dictionary, we can assume the values with a reasonable degree of confidence.&lt;/p&gt;  &lt;p&gt;Alright, enough explanation, let’s see this in action and hopefully it will make sense.&amp;#160; MSDN has a great &lt;a href="http://technet.microsoft.com/en-US/library/jj219480(v=office.15).aspx"&gt;post&lt;/a&gt; on this but I found and error in it so that is why I am writing this post (plus I know you all like screenshots).&amp;#160; For my example, I have a bunch of PowerPoint documents about SharePoint 2013 on my site.&amp;#160; I’ve created a custom entity extraction dictionary that will help me refine these documents by feature in SharePoint (i.e.: Apps, Business Intelligence, Search, Social, etc).&amp;#160; &lt;/p&gt;  &lt;p&gt;Before you build your dictionary file though, you need to decide on what type of extraction to use.&amp;#160; You can choose whether you want it to match a word or just part of it.&amp;#160; You can also specify whether it needs to match exactly.&amp;#160; The MSDN article summarizes this well, but here’s a quick recap of your choices.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Word Extraction&lt;/strong&gt; – case-insentive, word has to match, limited to 5 dictionaries&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Word Part Extraction&lt;/strong&gt; – case-insensitive, only part of a word has to match, limited to 5 dictionaries&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Word Exact Extraction&lt;/strong&gt; – case-sensitive, word has to match, limited to 1 dictionary&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Word Part Exact Extraction&lt;/strong&gt; – case-sensitive, only part of a word has to match, limited to 1 dictionary&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For today’s example, I am going to use Word Part Extraction as it gives you some of the most flexibility.&amp;#160; You might want to use Word Exact Extraction for extracting IDs from a document.&amp;#160; For example, you could use it to extract part numbers or invoice numbers.&amp;#160; Those aren’t something you would typically want to refine on but you may want to query on them.&amp;#160; FAST Search for SharePoint only provided case-sensitive extraction.&amp;#160; This made the feature less useful as you had to accommodate all possible varieties of case combinations in your dictionary file.&lt;/p&gt;  &lt;p&gt;To get started, we need to create a dictionary file. I started with notepad and I also edited with Excel some.&amp;#160; The format is simple “Key,Display form”.&amp;#160; The key is what the crawler matches in the body of the document and the Display form is what gets displayed in the refiner.&amp;#160; Although the Display form is optional, you want to include it as it allows you to control the exact way the text looks in the refiner (including case sensitivity).&amp;#160; Here’s the dictionary file I created.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;Key,Display form&lt;/p&gt;    &lt;p style="margin:0px;"&gt;bcs,Business Connectivity Services&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Business Connectivity Services,Business Connectivity Services&lt;/p&gt;    &lt;p style="margin:0px;"&gt;wcm,Web Content Management&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Web Content Management,Web Content Management&lt;/p&gt;    &lt;p style="margin:0px;"&gt;bi,Business Intelligence&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Business Intelligence,Business Intelligence&lt;/p&gt;    &lt;p style="margin:0px;"&gt;ecm,Electronic Content Management&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Electronic Content Management,Electronic Content Management&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Apps,Apps&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Analytics,Analytics&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Development,Development&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Service Application,Service Application&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Excel Services,Excel Services&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Office Web Apps,Office Web Apps&lt;/p&gt;    &lt;p style="margin:0px;"&gt;owa,Office Web Apps&lt;/p&gt;    &lt;p style="margin:0px;"&gt;wac,Office Web Apps&lt;/p&gt;    &lt;p style="margin:0px;"&gt;PerformancePoint,Business Intelligence&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Search,Search&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Social,Social&lt;/p&gt;    &lt;p style="margin:0px;"&gt;My Sites,My Sites&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Communities,Social&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Visio Services,Visio Services&lt;/p&gt;    &lt;p style="margin:0px;"&gt;Workflow,Workflow&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;The next step is to use the PowerShell command, &lt;strong&gt;&lt;a href="http://technet.microsoft.com/en-US/library/jj219614.aspx"&gt;Import-SPEnterpriseSearchCustomExtractionDictionary&lt;/a&gt;&lt;/strong&gt;.&amp;#160; The documentation on this page is correct which is how I found the solution to my problem.&amp;#160; The first step is to get a reference to the Search Service Application using &lt;strong&gt;Get-SPEnterpriseSearchServiceApplication&lt;/strong&gt;.&amp;#160; Then for our import command, we pass the service application, the &lt;em&gt;Filename&lt;/em&gt;, and the &lt;em&gt;DictionaryName&lt;/em&gt;.&amp;#160; Here’s where the complexity comes in.&amp;#160; The Filename requires a UNC path.&amp;#160; That means something like \\servername\path\file.csv.&amp;#160; It won’t take a relative path.&amp;#160; The next tricky part is where I found an issue in the documentation.&amp;#160; I wanted to use the Word Part extraction, it has the case of the word “WordPart” incorrect in the dictionary name.&amp;#160; If you do specify the DictionaryName wrong, it will not work.&amp;#160; Here are the list of valid values which correspond to the extraction types we talked about above.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft.UserDictionaries.EntityExtraction.Custom.Word.&lt;em&gt;n&lt;/em&gt; [where &lt;em&gt;n&lt;/em&gt; = 1,2,3,4 or 5]&lt;/li&gt;    &lt;li&gt;Microsoft.UserDictionaries.EntityExtraction.Custom.ExactWord.1&lt;/li&gt;    &lt;li&gt;Microsoft.UserDictionaries.EntityExtraction.Custom.WordPart.&lt;em&gt;n&lt;/em&gt; [where &lt;em&gt;n&lt;/em&gt; = 1,2,3,4 or 5]&lt;/li&gt;    &lt;li&gt;Microsoft.UserDictionaries.EntityExtraction.Custom.ExactWordPart.1&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For the non-exact entries, you need to specify a value at the end (1 – 5) which specifies which extraction dictionary it uses.&amp;#160; In the case below, I did number 2 since I already messed up number 1 by specifying the dictionary name incorrectly. :)&lt;/p&gt;  &lt;p style="font-size:10pt;font-family:consolas;background:white;color:black;margin:0px;"&gt;$searchApp = Get-SPEnterpriseSearchServiceApplication&lt;/p&gt;  &lt;p style="font-size:10pt;font-family:consolas;background:white;color:black;margin:0px;"&gt;Import-SPEnterpriseSearchCustomExtractionDictionary –SearchApplication $searchApp –Filename \\server\c$\folder\WordPartExtraction.csv –DictionaryName Microsoft.UserDictionaries.EntityExtraction.Custom.WordPart.2&lt;/p&gt;   &lt;p&gt;When you run the commands, it will look like this.&amp;#160; I put the above in a script file for convenience.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchImportCustomEntityExtractorPowerShell_166CA095.png"&gt;&lt;img title="SearchImportCustomEntityExtractorPowerShell" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchImportCustomEntityExtractorPowerShell" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchImportCustomEntityExtractorPowerShell_thumb_791748CA.png" width="382" height="59" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next part I believe is a little different than the way you did it with FAST Search for SharePoint.&amp;#160; What you need to do is tell search which managed properties to perform entity extraction.&amp;#160; Effectively, what we are doing here is telling search to look at the body of the document and see if anything in there matches items in the dictionary.&amp;#160; To do this, go to your Search Service Application –&amp;gt; Search Schema and edit the property named &lt;em&gt;body&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedPropertiesBody_067D5BD1.png"&gt;&lt;img title="ManagedPropertiesBody" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ManagedPropertiesBody" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedPropertiesBody_thumb_17EDBCA9.png" width="512" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Scroll to the bottom and you will see the &lt;strong&gt;Custom entity extraction&lt;/strong&gt; section.&amp;#160; Now, we just need to check the box next to the dictionary we want to use.&amp;#160; In my case, it is &lt;em&gt;Word Part Extraction – Custom2&lt;/em&gt;.&amp;#160; If you have multiple dictionaries you may select them here.&amp;#160; Save the managed property after you make your selection.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedPropertyCustomEntityExtraction_03F42A13.png"&gt;&lt;img title="ManagedPropertyCustomEntityExtraction" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ManagedPropertyCustomEntityExtraction" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ManagedPropertyCustomEntityExtraction_thumb_5B091509.png" width="506" height="357" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;After you save, you need to &lt;strong&gt;start a full crawl &lt;/strong&gt;on your content source, typically &lt;em&gt;Local SharePoint sites&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;When this finishes, we can now begin to use our new extracted entities in our search center.&amp;#160; The first thing we want to do is add this new extraction to the Refinement web part so that users can refine results by SharePoint feature.&amp;#160; Go to your Search Center and issue a query that is going to get you some results that you know you can refine on.&amp;#160; In my case, I typed the word &lt;em&gt;SharePoint&lt;/em&gt; since I knew all of my documents were related to that.&amp;#160; Once you get search results, edit the page.&amp;#160; Then on the left side, edit the Refinement web part.&amp;#160; Now, click the &lt;strong&gt;Choose Refiners&lt;/strong&gt; button.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/RefinementWebPartProperties_1202F343.png"&gt;&lt;img title="RefinementWebPartProperties" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="RefinementWebPartProperties" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/RefinementWebPartProperties_thumb_0C47D99D.png" width="178" height="277" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This page will list all managed properties marked for refinement.&amp;#160; What’s really nice is that when you click on a managed property, it gives you a preview of the available refiners.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionRefinerProperties_2392DE0E.png"&gt;&lt;img title="CustomEntityExtractionRefinerProperties" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionRefinerProperties" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionRefinerProperties_thumb_13A3994A.png" width="454" height="373" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the list of available refiners, I select &lt;strong&gt;WordPartCustomRefiner2&lt;/strong&gt;.&amp;#160; Below, you see a list of Sample values and the number of times it found a match.&amp;#160; To configure the property, select it and click the &lt;strong&gt;Add&lt;/strong&gt; button.&amp;#160; I also added this new refiner up to the top since I want users to see it first.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionRefinerProperties2_66AE366E.png"&gt;&lt;img title="CustomEntityExtractionRefinerProperties2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionRefinerProperties2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionRefinerProperties2_thumb_7D8D07EA.png" width="462" height="482" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, I gave it a &lt;em&gt;Display name &lt;/em&gt;and you have the option to choose a different Display template as well as how it is sorted.&amp;#160; You can actually customize how the refiner is rendered on the page with the display template too but that’s outside of the scope of today’s post.&amp;#160; At the bottom of the page there is also a &lt;em&gt;Preview&lt;/em&gt; button.&amp;#160; Click on it and you will see what your search results look like before you even save the page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustonEntityExtractionRefinementPreview_4D82B669.png"&gt;&lt;img title="CustonEntityExtractionRefinementPreview" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustonEntityExtractionRefinementPreview" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustonEntityExtractionRefinementPreview_thumb_47C79CC3.png" width="462" height="349" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you’re happy with the way the refiners look, save the page, check it in, and publish it.&amp;#160; Now issue a query.&amp;#160; I am going to use the same one from before.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsDefault_05E0B775.png"&gt;&lt;img title="CustomEntityExtractionSearchResultsDefault" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionSearchResultsDefault" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsDefault_thumb_36278C2B.png" width="542" height="372" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see, we now see a list of the SharePoint features that we specified in our dictionary.&amp;#160; Let’s try a few refiners.&amp;#160; Let’s start by selecting &lt;em&gt;Electronic Content Management&lt;/em&gt;.&amp;#160; I do know that should it read &lt;em&gt;Enterprise&lt;/em&gt;, but it was after midnight when I started working on this. :)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsECM_41DCD35D.png"&gt;&lt;img title="CustomEntityExtractionSearchResultsECM" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionSearchResultsECM" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsECM_thumb_4B5591D3.png" width="553" height="253" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Notice, that in the results, that Word Document 3 comes back and you see “ECM” in it.&amp;#160; That’s the only text in the document and it matched it to that feature since we defined it in the dictionary.&amp;#160; Now let’s try &lt;em&gt;Business Connectivity Services&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsBCS_7072DC3F.png"&gt;&lt;img title="CustomEntityExtractionSearchResultsBCS" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionSearchResultsBCS" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsBCS_thumb_0E70EA34.png" width="563" height="449" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It returns several slide decks this time because it mentions it in the Intro deck, the BCS deck, UPS, etc.&amp;#160; I’m not sue how Visio Services made a hit to it, but maybe there is something new I need to learn. :)&lt;/p&gt;  &lt;p&gt;You can also select multiple refiners.&amp;#160; In this case, I selected &lt;em&gt;Apps &lt;/em&gt;and &lt;em&gt;Web Content Management&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsCombined_7E15727A.png"&gt;&lt;img title="CustomEntityExtractionSearchResultsCombined" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionSearchResultsCombined" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsCombined_thumb_6368D661.png" width="577" height="317" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By now, I am hoping you are seeing the power of entity extraction.&amp;#160; It gives you a new level of classification on documents and the users never had to tag anything manually at all.&amp;#160; &lt;/p&gt;  &lt;p&gt;You can issue queries with these dictionaries as well too.&amp;#160; For example, if I want to search for anything tagged with &lt;em&gt;Apps&lt;/em&gt;, I would issue the following query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;WordPartCustomRefiner2:&amp;quot;Apps&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsQuery_0166E456.png"&gt;&lt;img title="CustomEntityExtractionSearchResultsQuery" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="CustomEntityExtractionSearchResultsQuery" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/CustomEntityExtractionSearchResultsQuery_thumb_469F3B7F.png" width="577" height="381" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I hope after reading this post, it has got you started thinking.&amp;#160; Most organizations have next to no metadata on their documents.&amp;#160; This isn’t a replacement for taking the time to classify your documents properly with site columns and content types.&amp;#160; Inferring metadata will never be as good as the users taking the time to classify the documents themselves.&amp;#160; However, it is a great stop-gap in dealing with all of that untagged content you have.&amp;#160; &lt;/p&gt;  &lt;p&gt;I think this is one of the most significant feature in SharePoint 2013 that most people will probably never use.&amp;#160; :(&amp;#160; Take the time to set up a few dictionaries and you are going to get immediate value out of search and your users are going to notice.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6103" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/ECM/default.aspx">ECM</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>List of common SharePoint 2013 Result Source IDs</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/04/list-of-common-sharepoint-2013-result-source-ids.aspx</link><pubDate>Fri, 04 Jan 2013 16:08:06 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6093</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Although the new Result Source feature in SharePoint 2013 is really cool, writing queries against them is not.&amp;#160; With scopes you could specify them by name (i.e.: All Sites or People).&amp;#160; However with result sources, you must specify the id not the name.&amp;#160; This cane make it tricky to develop custom coded solutions.&amp;#160; Luckily, it turns out that the IDs of the built-in result sources are all the same (at least they appear to be) with the exception of the &lt;em&gt;Conversations &lt;/em&gt;result source.&amp;#160; In comparing an on-premises installation of SharePoint 2013 with a SharePoint Online Preview tenant, here is the list I came up with.&amp;#160; Hopefully, it will save you some time when you need to write a query.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Result Source&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;ID&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Documents&lt;/td&gt;        &lt;td&gt;e7ec8cee-ded8-43c9-beb5-436b54b31e84&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Items matching a content type&lt;/td&gt;        &lt;td&gt;5dc9f503-801e-4ced-8a2c-5d1237132419&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Items matching a tag&lt;/td&gt;        &lt;td&gt;e1327b9c-2b8c-4b23-99c9-3730cb29c3f7&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Items related to current user&lt;/td&gt;        &lt;td&gt;48fec42e-4a92-48ce-8363-c2703a40e67d&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Items with same keyword as this item&lt;/td&gt;        &lt;td&gt;5c069288-1d17-454a-8ac6-9c642a065f48&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local People Results&lt;/td&gt;        &lt;td&gt;b09a7990-05ea-4af9-81ef-edfab16c4e31&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local Reports And Data Results&lt;/td&gt;        &lt;td&gt;203fba36-2763-4060-9931-911ac8c0583b&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local SharePoint Results&lt;/td&gt;        &lt;td&gt;8413cd39-2156-4e00-b54d-11efd9abdb89&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local Video Results&lt;/td&gt;        &lt;td&gt;78b793ce-7956-4669-aa3b-451fc5defebf&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Pages&lt;/td&gt;        &lt;td&gt;5e34578e-4d08-4edc-8bf3-002acf3cdbcc&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Pictures&lt;/td&gt;        &lt;td&gt;38403c8c-3975-41a8-826e-717f2d41568a&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Popular&lt;/td&gt;        &lt;td&gt;97c71db1-58ce-4891-8b64-585bc2326c12&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Recently changed items&lt;/td&gt;        &lt;td&gt;ba63bbae-fa9c-42c0-b027-9a878f16557c&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Recommended Items&lt;/td&gt;        &lt;td&gt;ec675252-14fa-4fbe-84dd-8d098ed74181&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Wiki&lt;/td&gt;        &lt;td&gt;9479bf85-e257-4318-b5a8-81a180f5faa1&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Of course this doesn’t help you much for your own custom result sources, but at least you should be able to work with this list for anything built-in.&amp;#160; This is especially useful if you want to write queries to do people search or get popular items.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6093" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>How to: Pass parameters to a Client Web Part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/04/how-to-pass-parameters-to-a-client-web-part.aspx</link><pubDate>Fri, 04 Jan 2013 16:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6090</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>5</slash:comments><description>&lt;p&gt;This is one of those posts that I have promised to write but I totally forgot about.&amp;#160; What I want to talk about today is passing parameters to SharePoint 2013 Client Web Parts.&amp;#160; These parameters are equivalent to the properties on traditional web parts.&amp;#160; The process is relatively straight forward, but I thought I would share some of my experiences with it.&amp;#160; This &lt;a href="http://msdn.microsoft.com/en-us/library/fp179921.aspx"&gt;article&lt;/a&gt; on MSDN will get you started, but I do things a bit differently.&amp;#160; &lt;/p&gt;  &lt;p&gt;Unfortunately, the updates to the tools with &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-preview-2.aspx"&gt;Preview 2&lt;/a&gt; don’t add anything to make this process easier. There are three steps to adding a property to a client web part.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In elements.xml, add a property element which contains the description, type, default value, and other information.&lt;/li&gt;    &lt;li&gt;In elements.xml, edit the query string of the src attribute of the Content element to pass the parameter to the client web part page.&lt;/li&gt;    &lt;li&gt;Write JavaScript code to receive the value of the parameter.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;When it comes to Client Web Part parameters, there are four types:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;string&lt;/li&gt;    &lt;li&gt;boolean&lt;/li&gt;    &lt;li&gt;int&lt;/li&gt;    &lt;li&gt;enum&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You will use the above values in the &lt;em&gt;Type&lt;/em&gt; attribute of the property you add.&amp;#160; It must match exactly.&amp;#160; Let’s take a look at the &lt;em&gt;Property &lt;/em&gt;element and see what the values do.&amp;#160; In this case, we’ll add a string property.&amp;#160; In Preview 1, the elements.xml file used to include a commented example, but now that’s gone.&amp;#160; Here’s an example.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyString&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;string&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebBrowsable&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Ny String&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDescription&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Text description of my string&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebCategory&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Configuration&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;DefaultValue&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Default My String&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;RequiresDesignerPermission&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Aside from the type, the properties that you will probably care about are the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt; – name of the parameter you will query by JavaScript&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt; – data type&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;WebDisplayName&lt;/strong&gt; – name of the parameter displayed to the user in the web part properties&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;WebDescription&lt;/strong&gt; – description of the parameter displayed to the user&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;WebCategory&lt;/strong&gt; – group name in the web part properties&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;DefaultValue&lt;/strong&gt; – the default value if the user does not change it&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The &lt;em&gt;Property &lt;/em&gt;element looks similar for both boolean and int types as well.&amp;#160; However, if you specify &lt;em&gt;enum&lt;/em&gt;, the user will see a dropdown list of values.&amp;#160; It will contain an &lt;em&gt;EnumItems&lt;/em&gt; child element which looks like this.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyEnum&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;enum&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;RequiresDesignerPermission&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;DefaultValue&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;1&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebCategory&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Configuration&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Enum property&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EnumItems&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EnumItem&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Choice 1&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;1&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EnumItem&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Choice 2&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;2&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EnumItem&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;WebDisplayName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Choice 3&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;3&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EnumItems&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Once you finished defining your properties, you need to add them to the query string.&amp;#160; Effectively, SharePoint passes the values the user specifies by query string to the client web part page.&amp;#160; Each parameter comes in two pieces: the value your JavaScript will query and the the name from each &lt;em&gt;Property&lt;/em&gt; element.&amp;#160; Each parameter looks something like this.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Parameter1=_Parameter1_&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The value of the parameter is always enclosed in underscores (_).&amp;#160; For the two parameters we added above, here is what our &lt;em&gt;src &lt;/em&gt;attribute will look like.&amp;#160; I’m using the same app part I created for the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-build-client-web-parts-in-sharepoint-2013-with-office-developer-tools-preview-2.aspx"&gt;Preview 2&lt;/a&gt; blog post.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Content&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;html&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;Src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;~appWebUrl/Pages/ClientWebPart1.aspx?MyString=_MyString_&lt;/span&gt;&lt;span style="color:red;"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color:blue;"&gt;MyEnum=_MyEnum_&lt;/span&gt;&lt;span style="color:red;"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color:blue;"&gt;{StandardTokens}&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;You’ll also notice that I have included &lt;strong&gt;{StandardTokens}&lt;/strong&gt;, this tells SharePoint to provide common useful values such as the URL to the Host Web (SPHostUrl).&lt;/p&gt;  &lt;p&gt;Now, we need to add JavaScript to the client web part itself to read the value and do something with it.&amp;#160; I use a helper method to help get query string values.&amp;#160; I’m pretty sure I got this method from one of the early SharePoint app examples but I’m not sure entirely.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; getQueryStringParameter(urlParameterKey) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; params = document.URL.split(&lt;span style="color:#a31515;"&gt;&amp;#39;?&amp;#39;&lt;/span&gt;)[1].split(&lt;span style="color:#a31515;"&gt;&amp;#39;&amp;amp;&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; strParams = &lt;span style="color:#a31515;"&gt;&amp;#39;&amp;#39;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;for&lt;/span&gt; (&lt;span style="color:blue;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; params.length; i = i + 1) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;var&lt;/span&gt; singleParam = params[i].split(&lt;span style="color:#a31515;"&gt;&amp;#39;=&amp;#39;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (singleParam[0] == urlParameterKey)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;return&lt;/span&gt; decodeURIComponent(singleParam[1]);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Using this method, we just request a value for the name of our parameters.&amp;#160; In my example below I simple assign the value to a div.&lt;/p&gt;  &lt;div style="font-size:10pt;font-family:consolas;background:white;color:black;"&gt;   &lt;p style="margin:0px;"&gt;$(&lt;span style="color:#a31515;"&gt;&amp;quot;#myString&amp;quot;&lt;/span&gt;).text(getQueryStringParameter(&lt;span style="color:#a31515;"&gt;&amp;quot;MyString&amp;quot;&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;$(&lt;span style="color:#a31515;"&gt;&amp;quot;#myEnum&amp;quot;&lt;/span&gt;).text(getQueryStringParameter(&lt;span style="color:#a31515;"&gt;&amp;quot;MyEnum&amp;quot;&lt;/span&gt;));&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, when we add the App Part to the host web, we can configure it.&amp;#160; In the case I gave, you can find the values in the &lt;em&gt;Configuration&lt;/em&gt; header.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ClientWebPartProperties_497788FF.png"&gt;&lt;img title="ClientWebPartProperties" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ClientWebPartProperties" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ClientWebPartProperties_thumb_20204101.png" width="244" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The values I selected can then be seen in the web part on the page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ClientWebPartWithValuesSet_7F2CCE59.png"&gt;&lt;img title="ClientWebPartWithValuesSet" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="ClientWebPartWithValuesSet" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ClientWebPartWithValuesSet_thumb_0B4E4881.png" width="404" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When you’re ready to add properties to your client web parts, I hope this post helps.&amp;#160; It’s not too complicated but it is a bit tedious.&amp;#160; Give it a try and see how it works for you.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6090" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+11/default.aspx">Visual Studio 11</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item></channel></rss>