Friday, 3 February 2017

SharePoint – Outlook Synchronization

You can configure your Outlook to synchronize the Tasks, Events, Calendar with SharePoint lists. This is possible thru the stssync Protocol.
The stssync protocol enables you to add an Events list or a Contacts list that exists on a Microsoft Windows SharePoint Services site to Microsoft Office Outlook 2003 / 2007 or to a third-party application that supports the protocol.
The URL which does this synchronization is having format of
stssync://sts/?ver=version&type=folder-type&cmd=command-name&base-url=sts-url&guid=the-guid&site-name=site-friendly-name&list-name=list-friendly-name&list-url=list-url&user-id=uid
e.g.
stssync://sts/?ver=1.1&type=tasks&cmd=add-folder&base-url=http://moss:99/Test/CompanySite&list-url=/Lists/Project%20Tasks/&guid={5d0b44fe1-3041-43f9-8be6-c330c1444538}&site-name=CompanySite&list-name=Project? Tasks
Where :
version :
The version of the application in the format x.y. For example, for Outlook 2003, the value of this parameter should be 1.0. For outlook 2007 version is 1.1. The values x and y must be composed of numbers only. x must not start with a zero, and y must be either zero or some other sequence of digits that does not start with a zero. Also x and y cannot be more than two digits each, or Outlook considers the URL to be malformed. A third-party client application may or may not use this parameter, but when the URL is constructed, the parameter must have a value — otherwise, the URL is considered malformed.
folder-type :
Can be calendar or contacts or task, depending on the type of SharePoint list being added to Outlook or to a third-party application. This parameter is case-insensitive.
command-name :
The command name that Outlook or the third-party application understands. Specify add-folder to add a folder to Outlook. More commands may be added to Outlook later.
sts-url :
The URL to the SharePoint site being added. Should not end in a / character.
the-guid :
The GUID that, when paired with the sts-url parameter, uniquely identifies a SharePoint list. Outlook expects this parameter to be in the following format: “{“+ 8 hexadecimal characters + “-” + 4 hexadecimal characters + “-” + 4 hexadecimal characters + “-” + 12 hexadecimal characters + “}”. If this parameter is in a different format, Outlook considers the URL malformed and returns an error.
site-friendly-name :
The display name of the site containing the list that is being added. Outlook uses this parameter to create the folder name.
list-friendly-name :
The display name of the list that is being added. Outlook uses this parameter to create the folder name.
list-url :
A string that is added to the sts-url parameter to create the full URL for the list. Should start with a / character.
uid :
Optional. A number greater than zero, with fewer than eight digits. Uniquely represents a user on the SharePoint site.
Notes
  • Special character escaping: If any of the characters “&”, “\”, “[“, “]”, or “|” is part of the value of the sts-url, site-friendly-name, list-friendly-name, or list-url parameter, it must be preceded by a “|” character. For example, a list-friendly-name of Dan [Wilson] – Business\Personal Contacts would become Dan |[Wilson|] – Business|\Personal Contacts.
  • The sts-url, site-friendly-name, list-friendly-name, and list-url parameters can contain Unicode characters. However, the Unicode characters must be enclosed in brackets “[ ]” and must be 4-digit hexadecimal character representations of the Unicode characters.
  • When you connect a Microsoft Windows SharePoint Services task list to Microsoft Office Outlook 2007, some columns may not appear in Outlook 2007. This is because you can synchronize a limited set of predefined properties by using the Connect to Outlook feature. However, you cannot connect custom SharePoint task list columns to Outlook 2007.
    All Outlook 2007 users see the same information when they view synchronized SharePoint task list items. This is true even if an Outlook field such as Categories does not appear in Internet Explorer when you view a SharePoint task list. Outlook synchronizes these properties to other Outlook users through the server that is running Windows SharePoint Services.
    To view an Outlook 2007 field such as Categories in Internet Explorer, add that field as a column template. To add an Outlook 2007 field to the SharePoint task list, use the Add Site Columns command on the Settings menu in the SharePoint task list. Administrators can use this feature to make the appearance of the synchronized SharePoint task list more consistent with Outlook 2007 and can sync a limited set of predefined properties.
To implement a third-party client that can make use of the stssync protocol to add and synchronize Events and Contacts lists that exist on a SharePoint site, you typically need to implement an ActiveX control called StssyncHandler and provide support for the stssync protocol. The third-party client typically needs to be able to decode the URL and synchronize the Contacts or Events list on the SharePoint site. You can use the Microsoft.SharePoint namespace or the Web services exposed by Windows SharePoint Services to perform this task. You also need to register the stssync protocol in the registry with the name of the executable file of your application. In Microsoft Windows operating environments with Microsoft Internet Explorer version 5.0 or later, you can use the sample provided below. Copy the following lines to a .reg file, and replace the “” with the path to the executable file of the application that wants to synchronize events and contacts with Windows SharePoint Services. Then double-click the .reg file to register the stssync protocol on your computer.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\stssync]
@=”URL:Add SharePoint Folder”
“URL Protocol”=””
[HKEY_CLASSES_ROOT\stssync\shell]
@=”open”
[HKEY_CLASSES_ROOT\stssync\shell\open]
@=””
[HKEY_CLASSES_ROOT\stssync\shell\open\command]
@=” \”%1\””
Example
stssync://sts/?ver=1.0&type=calendar&cmd=add-folder&base-url=http%3A%2F%2Fspserver1&list-url=%2FLists%2FEvts%2FAllItems%2Easpx&guid=%7BAA7D945C%2DE5C3%2D4854%2DB631%2D10A98E711E2B%7D&site-name=Share|%7CPoint%20|%5BSite|%5D&list-name=Ev[00E900F1]ts
This URL is for a list called “Events” on a site called “Share|Point [Site]” with site URL http://spserver1 and list URL http://spserver1/Lists/Evts/AllItems.aspx. Note the use of the vertical bar to escape the “|”, “[“, and “]” characters, and the hexadecimal representation of the two Unicode characters in the list name.

Javascript to trigger Connect to Outlook feature in SharePoint 2013

Adding this custom button, they do not need to access to the calendar page and hit on the SharePoint Ribbon button.
To achieve this function, firstly, you need to know how to mock the original Connect to Outlook button javascript.
A little digging tells us that there are a few options/properties we need to configure including:
base-urlhttps://www.nothingbutsharepoint.com/Calendar
list-url/Lists/SharePointEvents/
guid???????
site-nameNBSP Calendar
list-nameSharePointEvents
script src="http://code.jquery.com/jquery-1.6.1.min.js">
script language="javascript" type="text/javascript">
  function replaceURL() {
    $('#outlookLink').attr('href','stssync://sts/?ver=1.1&type=discussions&cmd=add-folder&base-url=http://dev-dc01-spweb:90&list-url=http://dev-dc01-spweb:90/Documents/Forms/AllItems.aspx&guid=%7B49D380A2-EBF2-40E0-99DF-9916AC51B003%7D&site-name=http://dev-dc01-spweb:90&list-name=Documents');
  }

  _spBodyOnLoadFunctionNames.push("replaceURL");
/script>
a id="outlookLink" href="#">Link to Outlook



folder-type

Required. Can be calendar or contacts,Documents,discussions

Stssync Protocol

Windows SharePoint Services 3
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
The stssync protocol enables you to add an Events list or a Contacts list that exists on a Windows SharePoint Services site to Microsoft Office Outlook 2007 or to a third-party application that supports the protocol.
stssync://sts/?ver=version&type=folder-type&cmd=command-name&base-url=sts-url&guid=the-guid&site-name=site-friendly-name&list-name=list-friendly-name&list-url=list-url&user-id=uid
version
Required. The version of the application in the format x.y. For example, for Outlook, the value of this parameter should be 1.0. The values x and y must be composed of numbers only. x must not start with a zero, and y must be either zero or some other sequence of digits that does not start with a zero.
NoteNote
x and y cannot be more than two digits each; otherwise Outlook considers the URL to be malformed. A third-party client application may or may not use this parameter, but when the URL is constructed, the parameter must have a value—otherwise the URL is considered malformed.
folder-type
Required. Can be calendar or contacts, depending on the type of SharePoint list being added to Outlook or to a third-party application. This parameter is case-insensitive.
command-name
Required. The command name that Outlook or the third-party application understands. Specify add-folder to add a folder to Outlook. More commands may be added to Outlook later.
sts-url
Required. The URL to the SharePoint site being added. Should not end in a / character.
the-guid
Required. The GUID that, when paired with the sts-url parameter, uniquely identifies a SharePoint list. Outlook expects this parameter to be in the following format: "{"+ 8 hexadecimal characters + "-" + 4 hexadecimal characters + "-" + 4 hexadecimal characters + "-" + 12 hexadecimal characters + "}". If this parameter is in a different format, Outlook considers the URL malformed and returns an error.
site-friendly-name
Required. The display name of the site containing the list that is being added. Outlook uses this parameter to create the folder name.
list-friendly-name
Required. The display name of the list that is being added. Outlook uses this parameter to create the folder name.
list-url
Required. A string that is added to the sts-url parameter to create the full URL for the list. Should start with a / character.
uid
Optional. A number greater than zero, with fewer than eight digits. Uniquely represents a user on the SharePoint site.

Notes


  • Special character escaping: If any of the characters "&", "\", "[", "]", or "|" is part of the value of the sts-url, site-friendly-name, list-friendly-name, or list-url parameter, it must be preceded by a "|" character. For example, a list-friendly-name of Dan [Wilson] - Business\Personal Contacts would become Dan |[Wilson|] - Business|\Personal Contacts.
  • The sts-url, site-friendly-name, list-friendly-name, and list-url parameters can contain Unicode characters. However, the Unicode characters must be enclosed in brackets "[ ]" and must be 4-digit hexadecimal character representations of the Unicode characters.
  • To implement a third-party client that can make use of the stssync protocol to add and synchronize Events and Contacts lists that exist on a SharePoint site, you typically need to implement an ActiveX control named StssyncHandler and provide support for the stssync protocol. The third-party client typically needs to be able to decode the URL and synchronize the Contacts or Events list on the SharePoint site. You can use the Microsoft.SharePoint namespace or the Web services exposed by Windows SharePoint Services to perform this task. You also need to register the stssync protocol in the registry with the name of the executable file of your application. In Microsoft Windows operating environments with Internet Explorer version 5.0 or later, you can use the sample provided below. Copy the following lines to a .reg file, and replace  with the path to the executable file of the application that wants to synchronize events and contacts with Windows SharePoint Services. Then double-click the .reg file to register the stssync protocol on your computer.
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\stssync]
    @="URL:Add SharePoint Folder"
    "URL Protocol"=""
    
    [HKEY_CLASSES_ROOT\stssync\shell]
    @="open"
    
    [HKEY_CLASSES_ROOT\stssync\shell\open]
    @=""
    
    [HKEY_CLASSES_ROOT\stssync\shell\open\command]
    @=" \"%1\""
    
    For information about the StssyncHandler control that is installed on the client computer during Microsoft Office setup, see StssyncHandler Control.

Example


stssync://sts/?ver=1.0&type=calendar&cmd=
add-folder&base-url=http%3A%2F%2Fspserver1&list-url=
%2FLists%2FEvts%2FAllItems%2Easpx&guid=
%7BAA7D945C%2DE5C3%2D4854%2DB631%2D10A98E711E2B%7D&site-
name=Share|%7CPoint%20|%5BSite|%5D&list-name=Ev[00E900F1]ts
This URL is for a list named "Evéñts" on a site named "Share|Point [Site]" with site URL http://spserver1 and list URL http://spserver1/Lists/Evts/AllItems.aspx. Note the use of the vertical bar to escape the "|", "[", and "]" characters, and the hexadecimal representation of the two Unicode characters in the list name.

Friday, 21 October 2016

Sharepoint 2013 - Remove "Recent" from left menu

Problem : 
My client has requested that she be able to remove (or hide) the "Recent" menu header from the left menu in Sharepoint 2013. This is for specified site collections/sites/pages, not farm-wide.

So far, I've tried to do this via JQuery by adding the following code

script type="text/javascript">
jQuery(document).ready(function() {
 jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
/script>

via both a script web-part and via a content editor web-part (using embed code), but to no avail. I've also tried adding the code above to a .js file (without the script tags) and calling it as



instead, but it still doesn't work.

I've checked the page source and I can see the script is included. The "Recent" menu item however, is still there. My prefered solution would be to hide the menu item rather than remove it - I suspect removing it will probably cause issues as Sharepoint likely expects it to be there.

There's no requirement to use JQuery - it just seemed to me to be the best way. I would also rather not edit master pages unless there's no other choice.

Any ideas?

Solution: 
If its specific site collection why don't go to site settings >> navigation settings and remove the "Recent" heading and its links.
Am I missing something?



script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript">/script>

script type="text/javascript"
jQuery(document).ready(function() {
  jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
/script>

Tuesday, 4 October 2016

SharePoint Object Model Hierarchy



SPFarm: The SPFarm object is the highest object within the Windows SharePoint Services object model hierarchy. The servers property gets a collection representing all the servers in the deployment and the services property gets a collection representing all the services.

SP SERVER: The Server object represents a physical server computer. The service instances property provides access to the set of individual service instances that run on the individual computer.

SPWebApplication: Each SPWebApplication object represents a load-balanced web application based in Internet Information Services (IIS). The SPWebApplication object provides access to credentials and other server Farm-wide application settings. The Sites property gets the collection of site collections within the web application and theContentDatabases property collection of content databases is used in the web application. The SPWebApplication class replaces the obsolete SPVirtualServer class but it can still be helpful to think of a SPWebApplication object as a virtual server; that is, a set of one or more physical servers that appear as a single server to users.

SP Content Database:
 the SPContentDatabase object inherits from the Database class and represents a database that contains user data for a SharePoint web application. The Sites property gets the collection of site collections for which the content database stores data and the WebApplication property gets the parent web application.

SPSiteCollection: An SPSiteCollection object represents the collection of site collections within the web application. The Item property or indexer gets a specified site collection from the collection and the Add method creates a site collection within the collection.

SPWEB: Each site collection includes any number of SPWeb objects and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site.

SPLIST: Each SPList object has members that are used to manage the list or access items in the list.

ITEMS: Each SPListItem object represents a single row in the list.

Sample code: 

using (SPSite site = new SPSite("http://************")) // Site Collection{ 
    using (SPWeb web = site.OpenWeb()) // Site    {
        SPList list = web.Lists["MyList"]; // List        int i = 1;
        foreach (SPListItem item in list.Items)
        {
            Console.WriteLine("Item: " + (i++).ToString());
            Console.WriteLine(item.Name);
            Console.WriteLine(item.Title);
            Console.WriteLine(item.GetFormattedValue("First Name"));
            Console.WriteLine(item.GetFormattedValue("Last Name"));
            Console.WriteLine(string.Empty);
        }
    }
}


Reference:
MSDN

Monday, 3 October 2016

SharePoint 2016 Feature Comparison for Social Feature

In this Article, I will List a Feature comparison between SharePoint 2013 VS SharePoint 2016 Including the Standard and Enterprise Features. Please see below table for comparison across SharePoint version. Below table will compare the Social Features Only.


Social features
SharePoint Foundation 2013
SharePoint Server 2013 Standard CAL
SharePoint Server 2013 Enterprise CAL
SharePoint Server 2016 Standard CAL
SharePoint Server 2016 Enterprise CAL
Ask Me About
No
Yes
Yes
Yes
Yes
Blogs
Yes
Yes
Yes
Yes
Yes
Communities Reputation, Badging, and Moderation
No
Yes
Yes
Yes
Yes
Community
No
Yes
Yes
Yes
Yes
Company Feed
No
Yes
Yes
Yes
Yes
Document Conversations with Yammer
No
No
No
No
No
Follow
No
Yes
Yes
Yes
Yes
Microblogging
No
Yes
Yes
Yes
Yes
Newsfeed
No
Yes
Yes
Yes
Yes
One Click Sharing
No
Yes
Yes
Yes
Yes
People, Sites, Document Recommendations
No
Yes
Yes
Yes
Yes
Personal Site
No
Yes
Yes
Yes
Yes
Photos and Presence
Yes
Yes
Yes
Yes
Yes
Profile
No
Yes
Yes
Yes
Yes
Ratings
No
Yes
Yes
Yes
Yes
Shared with Me
No
No
No
No
No
Site Feed
No
Yes
Yes
Yes
Yes
OneDrive for Business
Yes6
Yes
Yes
Yes
Yes
Tag profiles
No
Yes
Yes
Yes
Yes
Tasks integrated with Outlook
No
Yes
Yes
Yes
Yes
Trending Tags
No
Yes
Yes
Yes
Yes
Wikis
Yes
Yes
Yes
Yes
Yes

Social

Office 365
 
Applies to: Office 365
Topic Last Modified: 2016-05-17
Microsoft SharePoint Online is a collection of Web-based tools and technologies that help your organization store, share, and manage digital information. Built on Microsoft SharePoint Server 2013, this hosted service is ideal for working on projects, storing data and documents in a central location, and sharing information with others. The following Social features let people work together in ways that are most effective for them. How? By providing great collaboration tools that anyone can use to share ideas, find people and expertise, and location business information.

Ask Me About

The Ask Me About section of your profile lets you list your areas of expertise, presenting yourself as a go-to person for those areas to anyone who visits your profile page. Learn more about SharePoint profiles.

Blogs

Blogs can enable an organization to quickly share information among employees, partners, or customers. People can add insight to a difficult subject area, provide inspiration and guidance, or explain a new guideline or procedure.

Communities Reputation, Badging, and Moderation

When you participate in community discussions, you build your reputation as an expert and earn points and badges that reward your contributions. If you’re really into it, you can become a moderator and work behind the scenes to makes sure the community thrives. Learn more about moderating a community.

Community

An online community is a virtual place where ideas are discussed and shared. It promotes open communication by fostering discussions among users who both share their expertise and learn from others. Learn more about creating a community.

Company Feed

The company feed is an organization’s public newsfeed. All posts appear to the company, including those created by people that users might not be following. Learn more about Company Feed.

Document Conversations with Yammer

If your organization uses Yammer as its default social network, you can start a conversation about a document, image, or video that is stored in a SharePoint Online document library or in OneDrive for Business. The Yammer conversation appears within the document in your browser, allowing for real-time collaboration with people in your organization. Anyone with access to the file can take part in the Yammer conversation. Learn how to edit documents from Yammer.

Follow

Users can follow people, documents, sites, and tags to see newsfeed postings associated with people, documents, sites, and tags that interest them. Learn more about following a SharePoint site.

Microblogging

Microblogging lets users post items of interest in a newsfeed and participate in conversations. To learn more about microblogging, see Post something to everyone.

Newsfeed

A newsfeed is a place to post information and reply to other posts, and to get updates about people and content you’re following. You can post to the public newsfeed or to newsfeeds on team sites on which you’re a member. To learn more about the SharePoint newsfeed, see Post something to everyone.

One Click Sharing

You can easily share documents and sites with others in your organization, from your OneDrive for Business and Sites pages, helping promote team collaboration. Learn more about sharing ideas, sites, and content.

People, Sites, Document Recommendations

Your OneDrive for Business and Sites pages give you suggestions for documents and sites to follow, based on your profile information and newsfeed activity. Learn more about suggested documents to follow.

Personal Site

Each SharePoint Online users has a personal site where data is personalized for them. Personal site includes a Newsfeed, OneDrive document library, and Sites pages. To learn more about sharing ideas, sites, and content.

Photos and Presence

Exchange Online and Skype for Business Online integration with some Office 365 plans allows users to sync their profile pictures and presence indicator with SharePoint Online. Photos appearing in a person’s About Me page are managed by Exchange Online and are no longer managed by using the SharePoint admin center.

Profile

Part of a user’s profile is fed in from the Office 365 directory service. If an organization sets up Office 365 Directory Synchronization (DirSync), then user profiles will sync with that organization’s Active Directory accounts. Learn more about SharePoint profiles.

Ratings

Users can add ratings to their OneDrive for Business libraries that allow sites visitors to ‘Like’ a library document or to use a ‘star’ tool to rate it. Learn more about adding a ratings feature to a library.

Shared with Me

Find documents that others have shared with you. Shared with Me eliminates the worry of finding those important items, because now they're all visible in a single view from within your OneDrive for Business. For more information, see View documents and folders shared with you.

Site Feed

A site feed, similar to a newsfeed, is a place on a team site to post information, and reply to other posts. Learn more about posting something to a small group of people.

OneDrive for Business

OneDrive for Business is a service available with SharePoint Online that lets users sync documents to the cloud, and also to their computers. Learn more about OneDrive for Business.

Tag profiles

Tag profiles display information about tags that appear in a newsfeed. Information includes conversations that reference the tag and a list of related tags. Learn more about tags.

Tasks integrated with Outlook

You can synchronize your SharePoint task lists with Exchange so that you can manage and add tasks by using Outlook.

Trending Tags

Currently popular #tags references appear in public newsfeed posts.

Wikis

A wiki is a site designed for groups of people to quickly capture and share ideas by creating simple pages and linking them together. Every team site is a wiki, but you can also add a separate wiki page library to a site, or create a large-scale Enterprise wiki as a separate site or site collection. Learn more about creating a wiki.

Feature Availability

To view feature availability across Office 365 plans, standalone options, and on-premise solutions, see SharePoint Online Service Description