Showing posts with label 2013. Show all posts
Showing posts with label 2013. Show all posts

Tuesday, October 22, 2013

SharePoint Add Calendar Overlay Programmatically

This is sample of code to add calendar overlay pro grammatically:

using (SPSite site = new SPSite("http://sp2013-tarek294:8000/"))
{
     using (SPWeb web = site.OpenWeb())
    {
          web.AllowUnsafeUpdates = true;
          SPList list = web.Lists["Calendar"];
          SPView m_view = list.Views["Calendar"];
          m_view.CalendarSettings = SerializeAccessors();
          m_view.Update();
          web.AllowUnsafeUpdates = false;

    }
}

private static string SerializeAccessors()
{
 return "<AggregationCalendars>
  <AggregationCalendar Id="{56594c0c-5649-458e-a4e3-939589ddc75d}" Type="SharePoint" Name="Holiday" Description="Holiday" Color="5" AlwaysShow="True" CalendarUrl="/Lists/Calendar/Holiday.aspx">
    <Settings WebUrl="http://sp2013-tarek294:8000" ListId="{6913f374-1a4e-4772-8c5f-9f5d56610f71}" ViewId="{0091da5e-e5a4-4e1f-ab96-19f96eeb59fa}" ListFormUrl="/Lists/Calendar/DispForm.aspx" />
  </AggregationCalendar>
  <AggregationCalendar Id="{d65114d1-cb97-41db-a7eb-7cc3614c957e}" Type="SharePoint" Name="Meeting" Description="Meeting" Color="8" AlwaysShow="True" CalendarUrl="/Lists/Calendar/Meeting.aspx">
    <Settings WebUrl="http://sp2013-tarek294:8000" ListId="{6913f374-1a4e-4772-8c5f-9f5d56610f71}" ViewId="{68513c26-b132-4d9e-b9ca-acc74a4cf1dc}" ListFormUrl="/Lists/Calendar/DispForm.aspx" />
  </AggregationCalendar>
  -->
  <AggregationCalendar Id="{cd33c105-6dd4-4cb9-b6ee-ca26dfcdb70e}" Type="SharePoint" Name="TestView" Description="TestView" Color="3" AlwaysShow="True" CalendarUrl="/Lists/Calendar/TestView.aspx">
    <Settings WebUrl="http://sp2013-tarek294:8000" ListId="{6913f374-1a4e-4772-8c5f-9f5d56610f71}" ViewId="{2D81DDC1-A360-4585-BF4A-7C0E512C7AA8}" ListFormUrl="/Lists/Calendar/DispForm.aspx" />
  </AggregationCalendar>
</AggregationCalendars>"
}

Friday, August 16, 2013

SharePoint Migration Utilities

When I Migrated or revamped SharePoint I need to do some tasks help migrate old items, alerts, etc with new structure. I wroted some utilities to do these tasks using SharePoint API. I know there is many tools can do these tasks but here will find free utilities to do simple tasks.
Copy Files
Copy list Document libraries  and mapped old properties to new properties.

Copy Alerts
Copy Alerts from source web to destination Web

Copy Images
Copy Images from source image library to destination image library

Copy List Items
Copy List Items from source list to destination list

Copy Pages with resources
Copy Publish Pages between source and destination, Update layouts, clean HTML

Copy SharePoint Security
Copy Security between source and destination list.

Jungle.SharePoint.Util
Utilities help in migration tasks






Sunday, July 29, 2012

SharePoint 2013 New Features

In Share Point 2013 Microsoft has tried to improve the experience and make it easier for administrators to deal with the massive program. The most important features for me:
  1. Request Management:
    RM can route to WFEs with better health, keeping low-health WFEs alive
  2. New Replacement for Web Analytics Service:
    Find relevant information (improve search relevance) – based on views, click thru, etc.
  3. Distributed Cache Service:
    There is a new distributed cache service, based on Windows Server AppFabric Distributed Caching.
  4. Alternate Access Mappings and Self Service Site Creation
    • You can still use zones in conjunction with the Urls for a site for different auth methods, But you’re not tied to zones, you can use more than 5 Urls for a site.
    • You can specify a custom form that should be used to create a new site. You can also define policies in a content type hub and require or ask that each new site uses one of those policies.
  5. Themes:
    Everything is now based on HTML instead of proprietary format – including support for HTML5
    (PowerPoint is no longer used to create custom themes)
  6. Sharing – Problems: adding feature of managing and tracking (sharing links with permissions and permissions requests)
  7. Office Web Apps is no longer a service application. Seperated to own product
  8. Enhance capability of BCS: Access oData sources OOB just like WCF or SQL , has alert, and application level scope.
  9. Add Community Site Templates
  10. WCM:
    • Target different design depend on user agent
    • Search Engine Optimization (Metadata, sitemap generation, url mapping)
    • Cross Site Publishing
    • Enable Commerce (catalog Template)
    • Manage navigation by terms store
    • Device based rendering
  11. SharePoint Workflow Improvements
    • Introducing “Stages” (State machine)
    • Declarative workflows have loops
    • Declarative workflows can call REST/SOAP services
  12. For more information you can download Share Point 2013 presentations download