Wednesday, December 11, 2013

Missing server side dependencies. [MissingWebPart]

1.Enter as a Share Point Data Base Admin. Open SQL Server Management Studio.
Run the following Query
USE [WSS_Content_496dfc8bef2d46778f162ef78015268b]
SELECT * FROM AllDocs
INNER JOIN AllWebParts ON AllDocs.Id = AllWebParts.tp_PageUrlID
WHERE AllWebParts.tp_WebPartTypeID = '24019518-b52f-2e6d-868e-df1ed1b64b1d'



Modify the content Database and add web part ID

Tuesday, December 10, 2013

PowerShell Remove Features in SharePoint because of Health Issue For "Missing Feature"

Run The below power shell Method in SharePoint Management shell.
 function Remove-SPFeatureFromContentDB($ContentDb, $FeatureId, [switch]$ReportOnly)
{
    $db = Get-SPDatabase | where { $_.Name -eq $ContentDb }
    [bool]$report = $false
    if ($ReportOnly) { $report = $true }
   
    $db.Sites | ForEach-Object {
       
        Remove-SPFeature -obj $_ -objName "site collection" -featId $FeatureId -report $report
               
        $_ | Get-SPWeb -Limit all | ForEach-Object {
           
            Remove-SPFeature -obj $_ -objName "site" -featId $FeatureId -report $report
        }
    }
}
function Remove-SPFeature($obj, $objName, $featId, [bool]$report)
{
    $feature = $obj.Features[$featId]
   
    if ($feature -ne $null) {
        if ($report) {
            write-host "Feature found in" $objName ":" $obj.Url -foregroundcolor Red
        }
        else
        {
            try {
                $obj.Features.Remove($feature.DefinitionId, $true)
                write-host "Feature successfully removed from" $objName ":" $obj.Url -foregroundcolor Red
            }
            catch {
                write-host "There has been an error trying to remove the feature:" $_
            }
        }
    }
    else {
        #write-host "Feature ID specified does not exist in" $objName ":" $obj.Url
    }
}



To run only a report (-ReportOnly property):
Remove-SPFeatureFromContentDB -ContentDB "Content_DBName" -FeatureId "e8389ec7-70fd-4179-a1c4-6fcb4342d7a0" –ReportOnly

To remove the feature from all sites, site collections in the db run (no -ReportOnly property):
Remove-SPFeatureFromContentDB -ContentDB "Content_DBName" -FeatureId "8096285f-1473-45c7-85b7-f745e5b2cf29" 

Tuesday, December 3, 2013

Enable Bread crumb in sharepoint 2013

SharePoint 2007 and SharePoint 2010 we have Bread crumb option.  this feature is just disable by default. This post will help you enable it back using simple steps
1. You will need SharePoint Designer 2013 to achieve this. Once you have it downloaded and installed, open the SharePoint site in it.
2. Go to the Master page section and create a copy of the currently used master page. ( Its as simple as clicking on the master page -> copy -> right click -> paste :) )
3.Click on the newly created master page, and then click on edit file.
4. You will see the css code in it. Search for the term “GlobalBreadCrumbNavPopout” or “ms-breadcrumb-dropdownBox”. Below is a snapshot on how it looks
1
As highlighted, change the visible attribute to “true” and remove the tag  style=”display:none;”
5. After the changes, below is how your code should look like
2
6. Thats it!!.. Save the master page. Set it to default master page and you have the breadcrumb now available in your site.

Sharepoint Calendar Size Reduce as a Small Calendar

2010 CSS: /**** Small Calendar ***/
.ms-acal-item{height: 10px !important;}
.ms-acal-sdiv,
.ms-acal-mdiv,
.ms-acal-ctrlitem,
.ms-acal-month-weeksel,
.ms-acal-title{display: none;}
.ms-acal-summary-itemrow TD DIV{height: 15px !important;}
2013 Content Editor Web Part CSS: <style>
/**** Small Calendar ***/
.ms-acal-item{height: 10px !important;}
.ms-acal-sdiv,
.ms-acal-mdiv,
.ms-acal-ctrlitem,
.ms-acal-month-weeksel,
.ms-acal-title,
.ms-acal-month-top span{display: none;}
.ms-acal-summary-itemrow TD DIV{height: 15px !important;}
</style>

Give Read Permission for SharePoint Add-in for Azure AD Send Mail to Office 365 Domain Group users.

Below are the Steps for Send Mail to Office 365 Domain Group or AD Group users from Provider Hosted ADD-IN. For this we needs to Give Permi...