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

SharePoint 2013: Points you have to take care before SharePoint 2010 to SharePoint 2013 Migration

Hi,

Here is a link that addressed the points which we need to take care before start SharePoint 2010 to 2013 migration process.

http://en.share-gate.com/blog/not-working-after-sharepoint-migration-to-2013

Cheers
Suresh

SharePoint 2013: Migration of SharePoint 2010 to SharePoint 2013

Hi,

Here is the good link that have step by step information regarding migration.

Hope this help!

http://www.codeproject.com/Articles/663663/Live-Migration-of-SharePoint-2010-to-SharePoint-20

Cheers
Suresh

SharePoint 2013: Upload a file more than 2MB in size file to SharePoint Online document library using REST API

Hi,

As you know, you cant upload a file more than 2MB in size into a SharePoint Online document library using SDK.

but you can use REST API which allows you to upload a maximum of 2GB file.

I spent many days behind this and finally get the solution. I have created Console Application and use the REST API modal to upload a file which is bigger than 2MB in size.

Please send me email on suresh7098@gmail.com to get a source code.

Cheers
Suresh

SharePoint 2013: Branding SharePoint 2013 My Sites with Feature Stapling

Hi,


Here is a quick guide for branding SharePoint 2013 My Sites using Feature Stapling.


Create a new SharePoint Solution.

Select "Farm solution" then provides the correct URL to your My Site Host then click Finish.
  
Step 1: Provisioning the custom master page

Add a new Module to the project.


As a starting point just copy the original my sites master page from "\15\TEMPLATE\FEATURES\MySiteMaster\mysite15.master" into the project and rename it "CustomMySite.master" and integrate your HTML/CSS design to it.

Edit the Elements.xml and copy this:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="ML_MasterPages" List="116" Url="_catalogs/masterpage" Path="ML_MasterPages" RootWebOnly="TRUE">
    <File Url="CustomMySite.master" Type="GhostableInLibrary" />
  </Module>
</Elements>



You'll have to add the module to the feature you will create in step 2.

Step 2: Applying the custom master page to the site
We'll use an event receiver to apply the new master.


Add a new Feature with scope "Site" and name it "Site_ApplyCustomMasterPage";


Add an event receiver to the feature.
Add the following code:
namespace ClientName.MySitesBranding.Features.Site_ApplyCustomMasterPage
{
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Utilities;
    using System;
    using System.Runtime.InteropServices;
    using System.Security.Permissions;

    [Guid("{your Guid}")]
    public class Site_ApplyCustomMasterPageEventReceiver : SPFeatureReceiver
    {
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPSite siteCollection = (SPSite)properties.Feature.Parent;
            string masterUrl = SPUrlUtility.CombineUrl(siteCollection.ServerRelativeUrl, "_catalogs/masterpage/CustomMySite.master");

            foreach (SPWeb web in siteCollection.AllWebs)
            {
                try
                {
                    web.MasterUrl = masterUrl;
                    web.CustomMasterUrl = masterUrl;
                    web.Update();
                }
                catch
                {
                    if (web != null)
                        web.Dispose();

                    throw;
                }

                if (web != null)
                    web.Dispose();
            }
        }

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            SPSite siteCollection = (SPSite)properties.Feature.Parent;
            string masterUrl = SPUrlUtility.CombineUrl(siteCollection.ServerRelativeUrl, "_catalogs/masterpage/mysite15.master");

            foreach (SPWeb web in siteCollection.AllWebs)
            {
                try
                {
                    web.MasterUrl = masterUrl;
                    web.CustomMasterUrl = masterUrl;
                    web.Update();
                }
                catch
                {
                    if (web != null)
                        web.Dispose();

                    throw;
                }

                if (web != null)
                    web.Dispose();
            }
        }
    }
}

Step 3: Stapling the "apply mast page" feature to the personal site template

this action will hook your feature to any new personal site that will be created after staple is effective. If you need to apply the branding to existing personal write a PowerShell script that activates the feature for each

NOTE : As the MySiteHost (the "/my" root url) will usually already exist on the customer's target platform when they create their "User Profile Application Service" you'll have to manually activate the "ApplyCustomMasterPage" feature
on that site collection.


Create a new Feature with scope "Farm" and name it "Farm_MySiteStapler".


Then create a new empty Element name it "ML_ApplyCustomMasterPageStapler".

Add the following code
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation Id="{the Guid of the Site_ApplyCustomMasterPage feature}" TemplateName="SPSPERS#2" />
</Elements>

Note: that in SharePoint 2013 the Template to staple is "SPSPERS#2" whereas in SharePoint 2010 you had to staple "SPSPERS#0".


Add the module to the Stapler feature.

Your project should look like this:


At this point the branding will actually work for the root sites, if you wish to apply template to any sub site that will be created (such as Blogs,...) you need to follow step 4 to hook the WebProvisioned event.

Step 4 : Applying the master page to any sub site created under the my site


Add a new Event receiver "ER_MySite_ElementsWebProvisioned".



Selected the web event "a site was provisioned”.
Then enter the following code:
namespace ClientName.MySitesBranding.Receivers.ER_MySite_ElementsWebProvisioned
{
    using System;
    using Microsoft.SharePoint;

    public class ER_MySite_ElementsWebProvisioned : SPWebEventReceiver
    {
        public override void WebProvisioned(SPWebEventProperties properties)
        {
            SPWeb web = properties.Web;
            SPWeb rootWeb = web.Site.RootWeb;
            web.MasterUrl = rootWeb.MasterUrl;
            web.CustomMasterUrl = rootWeb.CustomMasterUrl;
            web.Update();
        }
    }
}


Now add the Event receiver to the "Site_ApplyCustomMasterPage" feature.
Your project should look like this:



Deploy your solution, activate the Farm feature and connect with a new user to his My Site check that the new master is applied. (Alternative is to delete your current My Site and connect to the site to force automatic re-creation)


Cheers
Suresh






SharePoint 2013: How to Filter Subject View with Discussion list to show only Expiry date greater than or equal to today

Hi All,

I have listed the steps:

1   Step 1:   Create Discussion board list. (Go to site->Site Contents -> Select “Discussion Board app” -> Give             App  Name -> Click OK button.
   Step 2:    Create custom Subject view.
a.       Go to List Settings page in discussion list.
b.      Click on “Create View” at bottom.
c.       Select “Subject” view.
d.      Give the View Name and then click on OK button.
e.      Click on custom Subject view to edit the view.
f.        Select the column as per below screenshot:
       
         










g.       Add the filter under the “Filters” section as per below screenshot:

         






h.      Select “In the top-level folder” under the “Show this View” in “Folders” section as per below screenshot:
           

i.         Finally click on OK button to save the changes.

Cheers
Suresh

how to set Link to “Download a Copy” in SharePoint 2010 and SharePoint 2013"

Hi All,

I spent much time to find how to set Link to “Download a Copy” in SharePoint 2010 and SharePoint 2013".

After digging so much, I found the solution.

A work around was to create a link to directly evoke the Download a Copy drop-down menu item.
http://site/_layouts/download.aspx?SourceUrl=url-of-document-in-library

Replace the "site" and "url-of-document-in-library" text in the above link with your own sites information and you should be set.

For ex: http://abc.com/_layouts/download.aspx?SourceUrl=http://abc.com/Style%20Library/PDF/abc.pdf

Hope this save time for some else.

Cheers
Suresh