Monday, April 29, 2013

Cannot delete Column from List

When tried to delete some columns from list using GUI, Some of them don't give me option to delete.
Problem: I Can't delete column if it is sealed, hidden, or readonly
Solution: Change values of these properties to false before trying to delete

You can use PowerShell to change these properties and remove column from List like below:
$web = Get-SPWeb -identity SiteUrl
$list = $web.Lists[listName]
$column = $list.Fields[FieldName]
$column.Sealed = $false
$column.Hidden = $false
$column.ReadOnlyField = $false

Thursday, April 25, 2013

SharePoint Variation Labels error

When tried to access Variation Label on SharePoint I faced error:

Field not found: Label

After investigation, I found article solved my problem:

Problem is some one in team changed Display Name of Label Field to Title. variationlabels.aspx page looks reads the item data based on the display name of the field. To solve problem Goto Variation Labels List and Change Title Field to Label and problem will be solved.

Wednesday, April 17, 2013

Design View in SharePoint Designer 2013

Microsoft removed Design View from SharePoint Designer 2013. SharePoint supposed new 2 options for the display of information in custom formats, SharePoint 2013 provides us with two options: 

  1. JSOM (JavaScript Object Model)/JQuery Custom Format
  2. Application of custom display templates to the Content Search web part to display the cross site information.

But we still need to use DataView for these reasons:

  • Problem of first option we need to handle cases of client browsers and crawlers does not support client side.
  • Content Search web part is not up to date.
Although  Microsoft removed Design View from SharePoint Designer 2013 we can create dataview with Share Point Designer 2013. When started to do this i faced many problems like ribbon actions activated or dimmed unexpected, DataView is not exported correctly.

I found article helped me to solve my problem:

I found my problem. I created blank page, I should created it as BlankWebPart. After created page as BlankWebPart and Edit page it in advanced View(with advanced view I cannot edit the page).

Tuesday, April 16, 2013

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown.

I faced the following error when to run sharepoint 2010 configuration wizard in my windows 8 machine:

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly 'System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I found problem I am not installed Chart Control in my machine. Problem is solved after download and installed. Chart control can be downloaded from the following location:

Monday, April 15, 2013

SharePoint 2013 Localizing Display Template

SharePoint 2013 is new and we didn't find documentation for  many items. One of missing items detailed documentaion about scripts in display templates.

I need to localize my template after I checked existing templates I found localization through JavaScript:
  1. They added local string in resource javascript file. You can create a JavaScript and add to your code as below:
      $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/YourCustomStrings.js");
    < /script >
  2. Code you will add to JavaScript:
    // Add your custom localized strings and then include these string dictionaries in your display templates using the $includeLanguageScript function

    $registerResourceDictionary("en-us", {
    "sampleCustomStringId": "Sample custom string",
    "rf_RefinementTitle_ManagedPropertyName": "Sample Refinement Title for ManagedPropertyName"
  3. To access resource using the following code:
    var diagRes = $resource("item_Diagnostic_ItemTitleFormat");

Monday, April 1, 2013

SharePoint Designer: Error while Compiling

I tried to create workflow in SharePoint Designer:

The Error occurrs only, if the workflow contains a workflow lookup and i want to compile it.
In this case the following error-code appears:
Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Cannot set unknown member 'LookupSPListItemStringProperty.ItemId'. HTTP headers received from the server - ActivityId: 9aefe91b-ad3d-4942-a9d6-62b23573db09. NodeId: WFFE_IN_1. Scope: /spo/2066dfc3-753d-448e-8402-3a0b9b06492d/42fbc970-d795-4c3e-b511-3d6368d46642/8a0077c0-0b4b-45e4-bde5-07ece5ae2c20. Client ActivityId : 2114fc9b-50c5-c037-e339-58dfee5e3821. ---> System.Net.WebExcepti

It took long time from me to solve. I decided to Re-register service into my side using command:

Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'https://workflowhost' -AllowOAuthHttp -Force

I reopened SharePoint Designer again and problem disappeared.