Friday, August 26, 2011

Using TaxonomyWebTaggingControl Programatically


To utilize the taxonomy control, below namespace must be declared

using Microsoft.SharePoint;
using Microsoft.SharePoint.Taxonomy;

Step: 1

Declare taxonomy control Page_Init()

TaxonomyWebTaggingControl _TaxonomyWebTaggingControl = new TaxonomyWebTaggingControl;
_TaxonomyWebTaggingControl.ID = "taxctrl";

_TaxonomyWebTaggingControl.IsMulti = true;
_TaxonomyWebTaggingControl.AllowFillIn = true;
_TaxonomyWebTaggingControl.IsUseCommaAsDelimier = true;

this.form.controls.add(_TaxonomyWebTaggingControl);

//Create taxonomy Session, term store, term set & group to pull metadata from Term Store Management

TaxonomySession _TaxonomySession = new TaxonomySession(SPContext.Current.Site);
TermStore _TermStore = _TaxonomySession.TermStores["Managed Metadata Service"];
Group _Group = _TermStore.Groups["System"];
TermSet _TermSet = _Group.TermSets["Keywords"];

//Assign the Term Store & Term Set to Taxonomy Control which helps to provide suggestions or pick metadata while you type in run time.

_TaxonomyWebTaggingControl.SspId.Add(_TermStore.Id);
_TaxonomyWebTaggingControl.TermSetId.Add(_TermSet.Id);

Step: 2

write the below code in Page_Load() in if(!IsPostBack) block

Below code fetches Metadata from userprofile property & assign to taxonomy field

//Fetching the Taxonomy metadata from SharePoint userprofile property

using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;


private string _CurrentUser = SPContext.Web.CurrentUser.ToString();

SPServiceContext _SPServiceContext = new SPServiceContext .Current;

UserProfileManager _UserProfileManager = new UserProfileManager(_SPServiceContext);
UserProfile _UserProfile = _UserProfileManager.GetUserProfile(_CurrentUser);

//Get the control using findcontrol() by Id
TaxonomyWebTaggingControl _TaxonomyWebTaggingControl = (TaxonomyWebTaggingControl) this.form.findcontrol("taxctrl");


//Again we are getting
taxonomy Session, term store, term set to create Taxonomy key value pairs(Term|GUID;)

TaxonomySession _TaxonomySession = new TaxonomySession(SPContext.Current.Site);
TermStore _TermStore = _TaxonomySession.TermStores["Managed Metadata Service"];
Group _Group = _TermStore.Groups["System"];
TermSet _TermSet = _Group.TermSets["Keywords"];

//Fetching Multi-value userprofile property "SPS-PastProjects" - which is Taxonomy field


UserProfileValueCollection _UserProfileValueCollection = _UserProfile["SPS-PastProjets"];
for(int i = 0; i < _UserProfilevalueCollection.Count; i++)
{
_TaxonomyWebTaggingControl.Text = String.Contact(_TaxonomyWebTaggingControl.Text, String.Format("{0}|{1};", _UserProfileValueCollection[i].ToString(), _TermSet[_UserProfileValueCollection[i].ToString()].Id.ToString()));
}

Step: 3

To get back the value from
TaxonomyWebTaggingControl & update the userprofile property

Write the below code in Save Event

//Get the control using findcontrol() by Id

TaxonomyWebTaggingControl _TaxonomyWebTaggingControl = (TaxonomyWebTaggingControl) this.form.findcontrol("taxctrl");

TaxonomyFieldValueCollection _TaxonomyFieldValueCollection = new TaxonomyFieldValueCollection(String.Empty);
TaxonomyFieldValueCollection.PopulateFromLabelGuidPairs(_TaxonomyWebTaggingControl.Text);

for(int i = 0; i < _TaxonomyFieldValueCollection; i ++)
{
_UserProfile["SPS-PastProjects"].AddTaxonomyTerm(_TermSet.Terms[_TaxonomyFieldValueCollection[i].Label].SourceTerm);
}

Tuesday, August 9, 2011

Office 365

Overview

Office 365 is a suite of Internet-based services that are designed to help meet your needs for robust security, 24/7 reliability, and user productivity. This set of documents provides service descriptions for the components of the suite.

Microsoft Exchange Online for Enterprises Service Description - Microsoft® Exchange Online is a hosted messaging solution that delivers the capabilities of Microsoft Exchange Server as a cloud-based service. It gives users rich and familiar access to email, calendar, contacts, and tasks across PCs, the web, and mobile devices.

Microsoft SharePoint Online for Enterprises Service Description – Microsoft SharePoint Online is a Microsoft Office 365 service for businesses of all sizes. Instead of installing and deploying Microsoft SharePoint Server on-premises, any business can now simply subscribe to SharePoint Online to provide their employees with an enterprise grade solution for creating sites to share documents and information with colleagues and customers.

Microsoft Lync Online for Enterprises Service Description – Microsoft® Lync™ Online is a next-generation cloud communications service that connects people in new ways, anytime, from virtually anywhere. Lync Online provides intuitive communications capabilities across presence, instant messaging, audio/video calling and a rich online meeting experience including PC-audio, video and web conferencing. Transform your interactions with colleagues, customers and partners from today’s hit-and-miss communication to a more collaborative, engaging, and effective experience.

Microsoft Office Professional Plus Service Description – With Office Professional Plus, users get the latest version of the Microsoft Office applications, seamlessly connected and delivered with cloud services, so they can access their documents, email, and calendars from virtually any device. Office Professional Plus includes the new Office Web Apps—online companions to Microsoft Word, Microsoft Excel®, Microsoft PowerPoint®, and Microsoft OneNote®—which let users review and make minor edits to documents directly from a browser.

Microsoft Office 365 Apple Devices Service Description - The Microsoft Office 365 Apple Devices Service Description provides customers with an overview of Office 365 capabilities on the Mac and iOS (iPhone and iPad) devices.

Microsoft Exchange Online Archiving Service Description – Microsoft Exchange Online Archiving is a cloud-based archiving solution for organizations that have deployed Microsoft Exchange Server 2010 on-premises. Exchange Online Archiving is an enterprise-class service that assists these organizations with their archiving, compliance, regulatory, and e-discovery challenges while simplifying their on-premises infrastructure, thereby saving costs and easing the information technology (IT) burden.

Microsoft Office 365 for Enterprises Support Service Description – Microsoft® Office 365 for enterprises Support Service Description provides information to customers about the technical and nontechnical support included in their subscription fee to Microsoft Office 365 for enterprises.

Microsoft Online Services Migration Service Description - The purpose of this service description is to provide information about the email migration services that are available from Microsoft Premier Deployment (MPD) for Office 365.

Microsoft Office 365 Mobility Services Description - The Microsoft Office 365 Mobility Services Description provides customers with information on mobility solutions—access to services from phones and devices—that are available for two online services in this current release namely, Microsoft Exchange Online and Microsoft SharePoint® Online.

Microsoft Office Web Apps Service Description – Microsoft® Office Web Apps is the online companion to Microsoft Word, Microsoft Excel®, Microsoft PowerPoint®, and Microsoft OneNote® applications that helps users access documents from almost anywhere. Users can view, share, and work on documents online with other users across personal computers, mobile devices, and the web.

Office 365 Security and Service Continuity Service Description – This service description describes the security, continuity, privacy, and compliance policies and controls for the Office 365 for enterprises service offerings. It is intended to provide Office 365 customers with an overview of how each of the Office 365 services is designed to provide a high degree of security, privacy, continuity, and compliance—service goals that are derived from the Microsoft Risk Management program.

Office 365 Identity Service Description – This document discusses the design, policies, and best practices related to Office 365 identity, including the creation of user accounts, password policy, co-existence, directory synchronization, and single sign-on ( identity federation). Users can gain access to Office 365 by authenticating to their Office 365 user accounts—either through a prompt to provide valid credentials or through a single sign-on process. Once authenticated, users’ identities refer to the user names associated with the Office 365 accounts.

What is SharePoint?

A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas.

A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making.

A SharePoint site helps groups of people (whether work teams or social groups) share information and work together.

For example, a SharePoint site can help you:

  • Coordinate projects, calendars, and schedules.
  • Discuss ideas and review documents or proposals.
  • Share information and keep in touch with other people.
SharePoint sites are dynamic and interactive -- members of the site can contribute their own ideas and content as well as comment on or contribute to other people's.


Microsoft SharePoint 2010 makes it easier for people to work together.

Using SharePoint 2010, your people can set up Web sites to share information with others, manage documents from start to finish, and publish reports to help everyone make better decisions.

Want to find out more? The sections below give details about SharePoint 2010 capabilities.


SharePoint 2010 capabilities.


Sites

​SharePoint 2010 Sites provides a single infrastructure for all your business Web sites. Share documents with colleagues, manage projects with partners, and publish information to customers.

Communities

​SharePoint 2010 Communities delivers great collaboration tools—and a single platform to manage them. Make it easy for people to share ideas and work together the way they want.

Composites

SharePoint 2010 Composites offers tools and components for creating do-it-yourself business solutions. Build no-code solutions to rapidly respond to business needs.​

Content

​SharePoint 2010 Content makes content management easy. Set up compliance measures ”behind the scenes”—with features like document types, retention polices, and automatic content sorting—and then let people work naturally in Microsoft Office.

Insights

​SharePoint 2010 Insights gives everyone access to the information in databases, reports, and business applications. Help people locate the information they need to make good decisions.

Search

​SharePoint 2010 Search cuts through the clutter. A unique combination of relevance, refinement, and social cues helps people find the information and contacts they need to get their jobs done.