Tuesday 25 April 2017

Fixed SharePoint 2013 Server Installation error "Windows Server App Fabric was not configured correctly".


SharePoint 2013 Server installation....?  Oh no....it's a daunting task for sure. Anyways, every problem has a solution. And we need to install SharePoint 2013 Server in order to continue SharePoint Development.


Following screenshot illustrates the scenario :


Following are the steps to fixed the error :

Problem resolve:

Step 1: regedit => search  "AppFabric" and delete all entries in regedit

Step 2:Restart

Step 3: Open powershell as admin

Step 4: Run the below command


$SharePoint2013Path = "D:\Software\SharePoint\SharePoint2013"


Start-Process "$SharePoint2013Path\PrerequisiteInstaller.exe" /KB2671763:$SharePoint2013Path\PrerequisiteInstallerFiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe

Start-Process "$SharePoint2013Path\PrerequisiteInstaller.exe" /AppFabric:$SharePoint2013Path\PrerequisiteInstallerFiles\WindowsServerAppFabricSetup_x64.exe

Step  5: Restart

Step 6: Start SP2013 SP1 installation,

Successfully Happy SharePointing............:)

Tuesday 18 April 2017

Increase or modify the number rating text in SharePoint 2013 Survey

Today, I faced a requirement in SharePoint 2013 rating questions that it is expected to use 6 types of rating text like:


  1. Very Satisfied
  2. Satisfied
  3. Somewhat Satisfied
  4. Somewhat Dissatisfied
  5. Dissatisfied
  6. Very Dissatisfied
OR

  1. Strongly Agree
  2. Agree
  3. Somewhat Agree
  4. Somewhat Disagree
  5. Disagree
  6. Somewhat Disagree
But in SharePoint 2013 Server, only 3 to 4 rating text are shown as illustrated in the figures below:


And the in response, the question appears like the screenshot below:



But my goal was to show the 6 texts that is written above. After some net surfing, I get a solution of this problem. First of all, I need to click on the "Respond to this Survey" as shown below:



After that Respond form appears, we need to edit the page as shown below:





Then, you need to add a Script Editor at the bottom of the page as shown below:


Click the "EDIT SNIPPET" and add the following script :

<style>


/* Removes Top Buttons */
table[id*='toolBarTbltop']{display:none;}

/* Removes Line */
.ms-formline {display:none;}

/* Removes Number Headings */
th.ms-gridCol {display:none;}

/* Change Main Question */
.ms-formlabel {font-weight: bold!important;}

/* Change Sub Question Options */
.ms-gridT1, .ms-gridCol {font-weight:normal!important;}

/* Change Sub Question Options Column Width */
.ms-gridCol {color:#444!important; width:110px!important;}

/* Change Sub Question Title Width */
.ms-gridT1 {padding: 0px 0px 10px 0px; width:300px!important;}

</style>

<script language="javascript" type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="jquery.SPServices-2013.01.min.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function (){

// Rating Scale
$("td.ms-gridCol:eq(0)").html("Strongly Agree ");
$("td.ms-gridCol:eq(1)").html("Agree");
$("td.ms-gridCol:eq(2)").html("Somewhat Agree");
$("td.ms-gridCol:eq(3)").html("Somewhat Disagree");
$("td.ms-gridCol:eq(4)").html("Disagree");
$("td.ms-gridCol:eq(5)").html("Strongly Disagree");



Finally, the rating options looks like the screenshots as shown below:





So, the target is achieved.

And

"The best way to escape from problem is to solve the problem."


Thursday 6 April 2017

Change Style of Document Library View Title Bar in On-Premise SharePoint 2013 Server

Suppose We have multiple document library view added as web part in a SharePoint Page. In order to fulfill client requirements, sometimes it is needed to change the look and feel of  SharePoint Document Library.

For this purpose, We need to add custom CSS by adding Content Editor Web Part just above the corresponding web part. In the content editor, we need to identify the Web Part id of particular zone web part and right down some css to change the view's title bar.


Following are the CSS:

<style type="text/css">
<span id="ms-rterangecursor-start" aria-hidden="true"></span>
<span id="ms-rterangecursor-end" aria-hidden="true"></span>

span#WebPartTitleWPQ10.js-webpart-titleCell 
{
    background: linear-gradient(lightskyblue, transparent);
}

</style>

Following screenshot shows the effect:




So, we can achieve the required style by adding custom CSS on the particular web part by means of adding Content Editor Web Part.


Happy SharePointing..........................:)

Wednesday 5 April 2017

Resolved Sharepoint 2010 Workflow Error In Sharepoint 2013 : Errors were found when compiling the workflow. The workflow files were saved but cannot be run. Unexpected error on server associating the workflow

When attempting to publish a SharePoint Designer 2010 workflow that is large or uses multiple Start Approval Process actions, an error indicating that the workflow cannot be published will be displayed.

  • SharePoint Designer will show the following error: “Errors were found when compiling the workflow. The workflow files were saved but cannot be run. Unexpected error on server associating the workflow”.
Cause

This problem is caused by the large number of Types that are created during workflow compilation, for workflows with many local workflow variables. It is more common for workflows with multiple Approval Process actions, as each pre-configured Approval Process Action comes with a large set of local variables, for the different configurable property of the Approval Process.
SharePoint uses the SPWebApplication UserDefinedWorkflowMaximumComplexity property to enforce a maximum number of Types in the workflow definition, and prevent compilation in these cases.

In my case, the workflow consists of 11th level of Approval process and it was not publishing successfully. Following screenshot illustrates the scenario:



Resolution

SharePoint administrators are now able to prevent compilation of workflows whose compilation would affect the performance of the farm. The default value of the property is 7000, but can be changed based on the needs and profile of the SharePoint farm.

The following PowerShell script can be used to adjust the value per SPWebApplication:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

$new_limit = 30000;

$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http://WebAppURL) 

$webapp.UserDefinedWorkflowMaximumComplexity = $new_limit 

$webapp.Update()

To give context to the default 7,000 value a Start Approval Process action contains 1176 nodes, a Start Feedback Process action contains 1010 and an empty Start Custom Task Process contains 13 nodes. 


After running the above PowerShell script successfully on my SharePoint Farm, the workflow published successfully. 


Happy SharePointing........................:)