Friday, 31 March 2017

Save site as template option isn't available in SharePoint Online in Office 365 or SharePoint Server 2013

When you browse to the SharePoint Online or SharePoint Server Site settings page, you discover that the Save site as template option isn't available.


his issue most frequently occurs because the Community Sites Feature site feature, the SharePoint Server Publishing site feature, or the SharePoint Server Publishing Infrastructure site collection feature is currently enabled or was previously enabled for the affected site.

SharePoint doesn’t support creating a template from a site where publishing or community features were enabled. This is because the publishing feature creates site elements that are not supported as part of a template, and these elements remain even when the feature is disabled. This also includes templates that were created through SharePoint Designer.

Note Although the Save site as template option may become available after you deactivate publishing features, it is still unsupported to create a template from a site that has ever had publishing features enabled. If you create a site from this template, you may encounter problems when you try to activate publishing on the new site. For example, you may receive the following error message:
Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: '......' OriginalException: Failed to compare two elements in the array.
In SharePoint Online, if you disabled scripting capabilities for the affected site, this also removes the Save site as template option. For more information, go to the following Microsoft website:

Although you can't use the Save site as template option in this scenario, you can use the app model to customize the provisioning process in SharePoint Online or SharePoint Server 2013. This lets you enable specific features, capabilities, and branding for your sites.

Error configuring PowerPivot 2012 on SharePoint 2013. New-PowerPivotSystemServiceInstance - The PowerPivot System Service does not exist in the farm

This is the PowerShell output if I run that command on its own:

PS C:\Users\sharepointsetup> New-PowerPivotSystemServiceInstance -Provision:$true New-PowerPivotSystemServiceInstance : The PowerPivot System Service does not exist in the farm. At line:1 char:1 + New-PowerPivotSystemServiceInstance -Provision:$true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Analy...ServiceInstance: NewPowerPivotMidTierServiceInstance) [New-PowerPivotSystemServiceInstance] , GeminiException + FullyQualifiedErrorId : Microsoft.AnalysisServices.SPAddin.PowerShell.NewPowerPivotMidTierServiceInstance
Configure Local Service Instances,
  • -Register PowerPivot System Services on local server
  • -Cannot create the service instances because the parent service doesnot exist
  • -Prerequisites check for execution filed. Farm is not in a valid state. in powerpivot by doing
Before installing or trying to install powerpivot in sharepoint 2013--
create secure store service key for powerpivot -- by going to CentralAdmin>secure store service>New and give name to target application ID-Powerpivotunattendedaccount, display name- Power pivot unattended account data refresh, contact email address, select none for target application name and click next. In the 1st field name type- username and field type a windows username, 2nd field type as - password and field type windows password and click next and provide admin account username name. Now go to download spPowerPivot installer Here and install the installer and open the power pivot configuration tool and follow the instructions.
or if you are using sql server 2012 standard version after installing the sp installer go to tools in the sql server 2012 and click configure powerpivot and follow instructions.

Wednesday, 29 March 2017

Modern SharePoint lists are here – Including integration with Microsoft Flow and PowerApps

Modern SharePoint lists are here – Including integration with Microsoft Flow and PowerApps: Connect with thousands of experts on the Microsoft Tech Community. Register now.

Hybrid Self-Service Site Creation now available for SharePoint Server 2013

While SharePoint Online in Office 365 is an attractive alternative to on-premises business solutions with SharePoint. You might want to or need to deploy specific solutions in the cloud while still maintaining your on-premises investments or gradually move to cloud using a staged, workload-driven approach.
Hybrid scenarios with Office 365 and SharePoint on-premises allow you to bring the cloud to your business while bringing the business to the cloud. Today we’re pleased to announce the availability of hybrid self-service site creation for customers of SharePoint Server 2013.
New hybrid self-service site creation allows SharePoint administrators to direct users site creations requests to Office 365.  This new hybrid capability allows administrators of SharePoint Server 2013 to have the option to enable their existing or new Self-Service Site Creation flow redirect users to SharePoint Online to create a Group (with an associated Team Site). SharePoint administrators can turn this feature on or off on the Self-service Site Collection Management page, accessible from SharePoint 2013 Central Administration.

This capability is included in the March 2017 Public Update available later today. Download the March 2017 Public Update for SharePoint Server 2013 at


Learn more about hybrid scenarios across Office 365 at
Download the hybrid scenarios pocket guide with SharePoint and Office 365 at
Get more information on implementing hybrid scenarios with SharePoint and Office 365 at

This article is shared for those users ,not follow the microsoft tech community to reach them .for more details see the below orginal author link.

How to change the long column name header to two rows or more in SharePoint 2013 Office 365

Some time SharePoint  column header needs to be quite long, but the content of the column is only a
few pixels wide, so loads of white space and horizontal scrolling required to see the rest of the content.
To avoid the long column to be shorten we can use this below css method to avoid this long column issue.
You can use SharePoint Designer to add the style to SharePoint list view page to make the column header multiple rows for long text.
Place the style under PlaceHolderMain tag like the capture below,

<style type= "text/css"> .ms-vh2 {white-space: normal} </style>

Sunday, 26 March 2017

Create a Publishing page in SharePoint 2013 using CSOM

This blog post explains how to create/add publishing pages to a Publishing Site in SharePoint 2013 using the managed Client Object Model (CSOM) .
Microsoft.SharePoint.Client.Publishing DLL to achieve this.
The Microsoft.SharePoint.Client.Publishing namespace will be used in the below sample.
Code Sample:

  1.  using System;
  2.  using System.Collections.Generic;
  3.  using System.Linq;
  4.  using System.Text;
  5.  using System.Threading.Tasks;  
  6.  using Microsoft.SharePoint.Client;
  7.  using System.Security;
  8.  using Microsoft.SharePoint.Client.Publishing;
  10.  namespace CreatepublishingPage
  11.  {
  12.      class Program
  13.      {
  14.          static void Main(string[] args)
  15.          {
  16.              AddPublishingPage();
  17.          }
  18.     public void AddPublishingPage()
  19.                     {
  20.                     ClientContext context;
  21.                     string pageName="CustomPage";
  22.                     Web webSite = context.Web;
  23.                     context.Load(webSite);
  24.                     PublishingWeb web = PublishingWeb.GetPublishingWeb(context, webSite);
  25.                     context.Load(web);
  27.                     if (web != null)
  28.                     {
  29.                     List pages = context.Site.RootWeb.Lists.GetByTitle(“Pages”);
  30.                     ListItemCollection defaultPages = pages.GetItems(CamlQuery.CreateAllItemsQuery());
  31.                     context.Load(defaultPages , items => items.Include(item => item.DisplayName).Where(obj => obj.DisplayName == pageName));
  32.                     context.ExecuteQuery();
  33.                     if (defaultPages  != null && defaultPages .Count > 0)
  34.                     {
  35.                     }
  36.                     else
  37.                     {
  39.                     List publishingLayouts = context.Site.RootWeb.Lists.GetByTitle(“Master Page Gallery”);
  40.                     ListItemCollection allItems = publishingLayouts.GetItems(CamlQuery.CreateAllItemsQuery());
  41.                     context.Load(allItems, items => items.Include(item => item.DisplayName).Where(obj => obj.DisplayName ==“BlankWebPartPage”));
  42.                     context.ExecuteQuery();
  43.                     ListItem layout = allItems.Where(x => x.DisplayName == “BlankWebPartPage”).FirstOrDefault();
  44.                     context.Load(layout);
  45.                     PublishingPageInformation publishingPageInfo = newPublishingPageInformation();
  46.                     publishingPageInfo.Name = pageName;
  47.                     publishingPageInfo.PageLayoutListItem = layout;
  48.                     PublishingPage publishingPage = web.AddPublishingPage(publishingPageInfo);
  49.                     publishingPage.ListItem.File.CheckIn(string.Empty, CheckinType.MajorCheckIn);
  50.                     publishingPage.ListItem.File.Publish(string.Empty);
  51.                     publishingPage.ListItem.File.Approve(string.Empty);
  52.                     context.Load(publishingPage);
  53.                     context.Load(publishingPage.ListItem.File, obj => obj.ServerRelativeUrl);
  54.                     context.ExecuteQuery();
  55.                     }
  56.                     }
  57.                     }
  61.      }
  63.  }

Was my Blog helpful?
If so, please let us know at the bottom of this page. If not, let us know what was confusing or missing I’ll use your feedback to double-check the facts, add info, and update this article.

SharePoint Hosted App in office 365 to create a Document Set in SharePoint 2013 using JSOM

In this article I would like to explain about how to create aDocument in SharePoint 2013 programmatically using javascript object model.
Document Set is a hybrid between a folder and a list item. Document Sets are a feature in SharePoint Server 2013 that enables an organization to manage a single deliverable, or work product, which can include multiple documents or files. A Document Set is a special kind of folder that combines unique Document Set attributes, the attributes and behavior of folders and documents, and provides a user interface (UI), metadata, and object model elements to help manage all aspects of the work product.
Before creating Document Set we need to activate the Document Set feature in site collection level. I already explained how to work on this document in my article.
There is no limit on the number of documents that can exist in a Document Set. However, display load times may be limited by the list view threshold which by default is set at 5,000 items.
Create Simple Hosted app in office 365 ,follow the below steps to configure this.
Click the NAPA Tool in SharePoint  developer site and choose SharePoint 2013 Template,
Then click the save button.This the default .aspx page in the app.
Check this default App.js page in that ADD-IN.
Copy the attached code and paste it in the app.js file.
Then select the General tab like below,

Choose permissions on the table .And give full access to  the list.
After saved the App Package. Click publisheButton.
After you published the App it will be available in App packages place.
Click Deploy App button to deploy this,
Click Trust it button to accept this app,

Click Create Document Set button and check this library.Documetn set has been created.

'use strict';
var hostweburl;
var appweburl;
var docSetContentTypeID ="0x0120D520";

(function () {

   // This code runs when the DOM is ready and creates a context object which is
   // needed to use the SharePoint object model
   $(document).ready(function () {
      //Get the URI decoded URLs.

   hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));

   appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));

function getQueryStringParameter(paramToRetrieve) {

   var params = document.URL.split("?")[1].split("&");

   for (var i = 0; i < params.length; i = i + 1) {

       var singleParam = params[i].split("=");

       if (singleParam[0] == paramToRetrieve) return singleParam[1];



function createdocumentset(){

var ctx = new SP.ClientContext(hostweburl);
var parentFolder;
var newDocSetName = "Test"
var web = ctx.get_web();
var list = web.get_lists().getByTitle('Documents');

parentFolder = list.get_rootFolder();

var docSetContentType =ctx.get_site().get_rootWeb().get_contentTypes().getById(docSetContentTypeID);

 ctx.executeQueryAsync(function (){
       SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docSetContentType.get_id());

function error(message) {
   return function (sender, args) {
       alert(message + ": " + args.get_message());
function success(message) {
   return function () {

Create Sites, Lists and Libraries in SharePoint 2016