Simple jQuery Autocomplete for SharePoint 2013 forms

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Autocomplete - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript",
      "Lisp",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  });
  </script>
</head>
<body>
 
<div class="ui-widget">
  <label for="tags">Tags: </label>
  <input id="tags">
</div>
 
 
</body>
</html>

How to configure SharePoint 2013 Search service?

After you have completed setup and the SharePoint Products Configuration Wizard, you new SP server is almost ready! If you upload a few documents or create some list items, it is expected to get those details as a search results. So, where is the problem? In most cases you need to setup search service initially and index all content on site collection.

 

  1. Go to Central Administration and select Manage Service Application
    srch1
  2. Open and click the Search Service Application list menu, you will be redirected to Search Administration page
    srch2
  3. Select “Content Sources” from left side menu
    srch3
  4. Select “Start Full Crawl” from dropdown menu in order to crawl your data from the databasesrch4

After a few minutes or hours (depends on content size), your search will start showing display results!

SharePoint 2013: System.ServiceModel.ServiceActivationException 500

Running out of memory is a well known bug for SharePoint 2013 search service specially because of noderunner.exe processes. Last week we had an issue with term set navigation change because of the following error: “system.servicemodel.serviceactivationexception 500”. Simply you cannot change anything. We have temporarily killed all noderunner.exe prcoesses, but it still failed.

 

Temp solution:
Enter the Windows Services list and just restart “SharePoint Host Search Controller”. After that make you should make your changes.

 

The same bug causes problems with editing SharePoint site in SharePoint Designer, simply you cannot open it. It is resolved in the same way.

How to rename Status Approval column?

In many projects we have the same request from end users: “To rename Status Approval column”. As you already know, this column is not visible in List Settings and therefore it cannot be changed as many other columns. But here is a simple trick:

  • Open “List Settings” and edit some column (eg. Created)
  • In the address bar at the end of URL, you will see the field name (&Field=Author)
  • Replace this value with &Field=Status%Approval
  • Hit enter and you will get the edit field for existing label
  • Change and confirm!

How to disable Sync Button for SharePoint Document libraries

By default, OneDrive for Business is used to sync the documents of a SharePoint document library down to local computer for offline access. Any user that has access to the document library has the option to Sync one or more libraries. In some cases company rights and policies request to disable this option for all users. If you log into your SharePoint site, and click on a document library, you should see a Sync button on the top right corner.

 

Sync

 

 

If you want to hide that button, or just disable in global settings, you need to click the gear in the top right and go to Site Settings. Choose link that says Search and offline availability.

 

You will see a line that says Offline Client Availability, and set the the option to no, then hit OK

 

That’s it.

How to wrap menu items in SharePoint 2013 global navigation?

This is a quick post to show the code snippet I used to wrap the global navigation items in SharePoint 2013. You can also use custom CSS code in order to get some space between navigation lines and items. First, open default masterpage of your site collection and find the following:

<SharePoint:AspMenu
   ID="TopNavigationMenu"
   Runat="server"
   EnableViewState="false"
   DataSourceID="topSiteMap"
   AccessKey="<%$Resources:wss,navigation_accesskey%>"
   UseSimpleRendering="true"
   UseSeparateCss="false"
   Orientation="Horizontal"
   StaticDisplayLevels="2"
   AdjustForShowStartingNode="true"
   MaximumDynamicDisplayLevels="2"
   SkipLinkText="" />

and replace with the code below:

<SharePoint:AspMenu
   ID="TopNavigationMenu"
   Runat="server"
   EnableViewState="false"
   DataSourceID="topSiteMap"
   AccessKey="<%$Resources:wss,navigation_accesskey%>"
   UseSimpleRendering="false"
   UseSeparateCss="false"
   Orientation="Horizontal"
   StaticDisplayLevels="2"
   AdjustForShowStartingNode="true"
   MaximumDynamicDisplayLevels="2"
   SkipLinkText=""
   ItemWrap="true"
   RenderingMode="List" 
   cssClass="mycss"/>

As you can see, the only diference is:

ItemWrap="true"
RenderingMode="List"
cssClass="mycss"

Create custom CSS file with the following content:

.mycss .level1
{
margin-left: 10px;
margin-right: 20px;
}
.mycss .level2
{
margin-left: 10px;
margin-right: 20px;
}
.mycss .level3
{
margin-left: 10px;
margin-right: 20px;
}

You need a more recent version of SharePoint Designer in SPD 2013?

If you try to open sharepoint site in SharePoint designer you may get following error: “Server error: The version of Microsoft SharePoint Foundation running on the server is more recent than the version of SharePoint Designer that you are using. You need a more recent version of SharePoint Designer.”

 

Solution: In SPD go to Account > Switch Account and type in the credentials of the site you are trying to open (it defaults to your Microsoft Login)

How to hide new pages in managed metada navigation?

When you use managed metadata options for global navigation on SharePoint site, you may face the problem with new pages. By default it is automatically visible next to regular top navigation items. In many cases, we need to hide those pages.

 

Simply, deselect option “Add new pages to navigation automatically” as shown on image. Good luck!