Posts

Showing posts from March, 2014

SharePoint 2013 - Add Remote Event Receiver Programmatically

Below is sample code of associate a remove event receiver to a list in the host web.  This is assuming that you have already add the remote event receiver in the project. public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)         {             SPRemoteEventResult result = new SPRemoteEventResult();             if (properties.EventType == SPRemoteEventType.AppInstalled)             {                 using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, false))                 {                     if (clientContext != null)                     {                         EventReceiverDefinitionCreationInformation eventReceiver = new EventReceiverDefinitionCreationInformation();                         eventReceiver.EventType = EventReceiverType.ListAdded;                         eventReceiver.ReceiverAssembly = Assembly.GetExecutingAssembly().FullName;                         eventReceiver.ReceiverClass = "RC

SharePoint 2013 Features Information List

I find this information is so useful.  I used to get my information from, http://blogs.msdn.com/b/razi/archive/2013/10/28/listing-all-sharepoint-2013-features-including-name-title-scope-id-and-description.aspx. But in case the site is down later, I retrieve them using server code (SPFeatureDefinition) on SharePoint 2013 environment.  You can get the feature ID and description below. There is some more information is you're interested. SharePoint Server 2013 Features Display Name (Title) Scope ID Description PublishingStapling(Publishing Features Stapling) Farm 001f4bd7-746d-403b-aa09-a6cc43de7942 Staple Publishing features SiteStatusBar(Site status bar) Farm 001f4bd7-746d-403b-aa09-a6cc43de7999 Creates a Microsoft OneNote 2010 notebook in the Shared Documents library and places a link to it on the Quick Launch. This feature requires a properly configured WOPI application server to create OneNote 2010 notebooks. BasicWebParts(Basic Web Parts) Site 00bfea71-1c