Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Home

spsite.pro - SharePoint blog and much more!

 

 LATEST POSTS

 
May 22
Duplicate validation messages of a rich text box

​For some reason the SharePoint shows a duplicate validation message for a rich text box.

22.05.png

May 06
PowerShell - Get a Specific Solution from Farm

Recently I needed to get a single wsp solution from a production SP farm before making a quick update to a newer version. The solution was required to have a stable working version which can be easily restored in case of any issue within the update. I haven't found the script after a quick search and had to create it myself in C# style:

Get-SPSolution | ForEach { if ($_.Name -eq "your-wsp-name".ToLower()) { $_.SolutionFile.SaveAs("c:\$($_.Name)"); Write-Host "Saved $($_.Name) !" } }

After speding some time investigation PowerShell code I come to a more PowerShell code:

$s = Get-SPSolution | Where { $_.Name -eq "your-wsp-name".ToLower()}; $s.SolutionFile.SaveAs("c:\$($s.Name)");

Optionally you can add Write-Host "Saved $($_.Name) !" to see the output. Of course, the 2nd command will work successfully only if there is such a solution in the Farm.

April 24
Trick - Set Title field value from Query String param

​I was looking at the TextField control using dotPeek and suddenly found such an interesting code in its parent:

spsitepro_set_title_field_value.png

April 23
SP2010 - Page Layout Validation Part 2 : Applying jQuery Validation

Introduction

In the last post I’ve described how to handle form submit event of publishing page based on a custom Page Layout. Now I want to apply jQuery Validation to it for 2 regular cases:

  1. Required field validation (Department)
  2. Date range validation (Date and End Date)

I’ve created a custom Page Layout with following controls: 

pl_v2-1.png

April 09
SP2010 - Page Layout Validation Part 1 : Overriding form submit

The issue

Recently I was preparing to a presentation about Publishing Features of SP2010, while making a demo for the presentation I found out for myself lack of support for validation when working with publishing pages (created based on a custom Page Layout).

For example, I have a custom text field in the Page Layout that is mapped to a required field in the related Content Type:
  • the field is not marked as required

  • validation takes place after page postback

  • no possibility to customize text

April 01
Change default text of SmallSearchInputBox

Sometimes you have the requirements to change default text of a search box for one site collection in your farm. The good news for you - it can be done with delegate control. There is a declaration in the SharePoint:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Control Id="SmallSearchInputBox" Sequence="50" ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="GoImageUrl">/_layouts/images/gosearch15.png</Property>
    <Property Name="GoImageUrlRTL">/_layouts/images/gosearchrtl15.png</Property>
    <Property Name="GoImageActiveUrl">/_layouts/images/gosearchhover15.png</Property>
    <Property Name="GoImageActiveUrlRTL">/_layouts/images/gosearchrtlhover15.png</Property>
    <Property Name="DropDownMode">ShowDD</Property>
    <Property Name="SearchResultPageURL">/_layouts/osssearchresults.aspx</Property>
    <Property Name="ScopeDisplayGroupName"></Property>
    <Property Name="FrameType">None</Property>
    </Control>   
</Elements>

March 29
SP2010 - Fixing "The form cannot be submitted because of an error" when modifying OOB workflow
Recently I had to modify OOB Publishing approval workflow. The customization was done very easy, but when I tried to test the result I received the following message, when I tried to attach modified workflow to Pages library:
 

"The form cannot be submitted because of an error"

December 18
Managed Metadata Tag Cloud Web Part: Installation & Configuration

Here's an instruction that will help you successfuly intall and configure Managed Metadata Tag Cloud Web Part on your farm. You will need to install the solution on the farm, activate the web part feature in the target site collection, and then add the web part to the desired page:

  1. Copy the wsp file to your SharePoint Server (Web Frontend)
  2. On the server, run PowerShell as Administrator and execute the script below step by step. Do not forget to change the tokens {token} to your values.
    Add-PSSnapin Microsoft.SharePoint.Powershell
    Add-SPSolution c:\{Your_Path}\spSitePro.TagCloud.wsp
    Install-SPSolution –Identity spSitePro.TagCloud.wsp –WebApplication {Your_Web_Application_Url} –GACDeployment
  3. Go to Central Administration -> System Settings -> Manage farm solutions and check if the spSitePro.TagCloud.wsp is successfully deployed.
...

December 12
SharePoint 2013 Preview. Field templates issue.
I faced with issue on custom new form of a list. This form had controls going page postbacks. After each postback the fields of boolean and note types are cleared. My first thought was the ViewState of contols is disabled, I thought so because one of the recommendation of the best practices is to disable ViewState if it is possible. After a while I have found out that the ViewState is enabled in all needed controls, but I have also found that the user controls for the fields do not have any value. My research has led me to the article that has good explanation how to create your own field and how new field templates work. In this article I saw that fields use JSLink property to store information about js file for rendering templates. This file is clientforms.js which is located in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS.

November 22
Free Managed Metadata Tag Cloud Web is released!

​​Our first solution - Manaaged metadata Tag Cloud Web Part is released. Please take a look here - http://spsitepro.codeplex.com.

 

 best posts of the week

 
View RSS feed
 

 Best Questions of the Week

 
View RSS feed
 

 Blogs We Follow

 
View RSS feed
​​​​​​​​​​​​