SharePoint4us

Explore the Experience in SharePoint 2013

Thursday, October 16, 2014

People picker Browser Compatability Issue







People Picker is not working on computers that have IE 11 installed

Unfortunately this is a known issue with People Picker and IE Version 11 and probably 10 as well.

Recently i came across a situation where am not able to work with people picker in IE 11 but am able to open the same thing in IE 9 and other browsers as well. So i started trying to identify the issue .

anyhow i will explain you how to fix it but this is a short-term solution. If Microsoft comes up with solution then we can go ahead .


Title       : People Picker Compatibility issue in IE 11 Browser .
Meta Tag    :  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

Description   :

Phyisical path of  pickerdialog.master file : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS.
Please take the back up of pickerdialog.master from production .
Open the pickerdialog.master add the meta tag  “<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> under head section”.
Save the pickerdialog.master .
Followed by IISREST.

Wednesday, October 15, 2014

Creation of List View Web parts in SharePoin 2013 and 2010


Some times we come across a situation where in we want to display list data on the home page or any other pages .

I will show you the simple way of creating the List view  web parts in SharePoint 2013



Create any custom list inside of your site. say "Students".

Now , you want to see the list  on the page as a report or something else .



Create page or existing page ...


Edit Page --> add web Part-->webparts gallery --->Lists and Libraries (Under this  section you will be able to see the list "Students". Select the List and Click ok .



Then the list will be placed on your page .

By default it will show you all the columns inside the list "Students".



If you wants to see only particular columns as per your interest then you can modify the view

By editing the web part we can modify the  Current View also .

Note : 
All the Views created inside the list will be Shown in  web part . If you done any changes inside list view again you need to edit that webpart and set that as default then only the changes reflects..




Applying Site Page as default home page in SharePoint 2010 and 2013

Goto Site Actions-->Site Settings-->Look and Feel --->Welcome page

Change the Page url ...

All set now you are able to see the site page as  home page of your site .


  1. Programatically......Changing the Welcome  Page  

public static void ChangeWelcomePage(SPWeb rootWeb, string pageName)
{
    if (PublishingWeb.IsPublishingWeb(rootWeb))
    {
  PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb(rootWeb);
  //Get the file name
  SPFile welcomeFile = rootWeb.GetFile(pageName);
  //Assign the new filename to the DefaultPage property
  pubWeb.DefaultPage = welcomeFile;
  //Update the Publishing Web.
  pubWeb.Update();
    }
}

Power Shell .


Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
################################################### code###################################################
$sourceWeb = $null try { $SiteUrl = "http://adigroup/myteamsite" $sourceWeb = Get-SPSite -identity $SiteUrl $oFolder = $sourceWeb.RootFolder; $oFolder.WelcomePage = "Pages/MyCustomPage.aspx"; $oFolder.Update();
} catch { write-host $_.exception
} finally { if($sourceWeb -ne $null){$sourceWeb.Dispose()}
}



Monday, October 13, 2014

Importance and Difference between SPListItem.Delete() method and SPListItem.Recycle() method.

If you delete a document in SharePoint using the UI, it’s being moved to the Recycle Bin, so that it can be restored if necessary. There are situations when you want to include deleting list items and documents in your custom solutions. The most commonly used approach I’ve seen is calling the SPListItem.Delete() method. While this does the job, and deletes the item, it deletes it permanently instead of moving to the Recycle Bin.

Looking carefully at the SPListItem class, you can find SPListItem.Recycle() method. It turns out that it’s exactly that method that you need to call in order to move a list item/document to the Recycle Bin instead of deleting it permanently.

In general moving items to the Recycle Bin instead deleting them permanently is what you should do in our custom solutions. It is standard SharePoint behavior and therefore something end users will expect of our solutions as well. You should perform the permanent deletion only if explicitly named in the requirements. Otherwise, let’s just stick to what SharePoint does to leverage the same User Experience.

Internally there isn’t much difference between the SPListItem.Delete and SPListItem.Recycle methods. Both call an internal SPListItem.Delete method with a different parameter which determines whether an item should be moved to the Recycle Bin or permanently deleted.

  1. public override void Delete()   
  2. {   
  3.       if (this.HasExternalDataSource)   
  4.       {   
  5.             SPUtility.ValidateFormDigest();   
  6.             string bdcid = (string) ((string) this.GetValue("BdcIdentity"));   
  7.             this.ParentList.DataSource.DeleteItem(bdcid);   
  8.       }   
  9.       else   
  10.       {   
  11.             this.DeleteCore(DeleteOp.Delete);   
  12.       }   
  13. }   
  1. public System.Guid Recycle()   
  2. {   
  3.       if (this.HasExternalDataSource)   
  4.       {   
  5.             SPExternalList.ThrowNotSupportedExceptionForMethod("Recycle", base.GetType());   
  6.       }   
  7.       return this.DeleteCore(DeleteOp.Recycle);   
  8. }   
  9.   

Monday, October 6, 2014

How to edit a page that has no “Edit Page” menu option in SharePoint( 2010 ,2013)



Some times we come across a situation where we can t find the edit button in ribbon even if we have full control .
 
 Solution :
Add the below parameter to your URL .
  ?ToolPaneView=2&pagemode=edit\

 sample URL :http://SharePointSite/pages/sample.aspx?ToolPaneView=2&pagemode=edit

Wednesday, August 27, 2014

Quering the listitems from without using Caml Builder setup

Quering the List Items from List and Doc Library   without using Caml Builder setup


Quering the listitems from  without using Caml Builder setup


Hi Guys ,

Generally, We do install cam builder setup in order to query the list items from list .

Now we can also retrieve the list  items without the  cam builder setup .

the only thing we need to do is to deploy the wsp and activate the feature like how we do regular wsp deployment

Get the Wsp from the link "http://www.u2u.be/Downloads/U2U.SharePoint.CQB2010.zip" (thanks to the one who made it for us )


After that open the list which u want to query, inside ribbon you can see the caml query icon , click on it explore the options available inside it .

Please go through it and  use this feature if it is helpful .







Friday, August 22, 2014

STSADM Commands and Power Shell Commands  for Deploying ,Installing activating feature


stsadm –o addsolution –filename “D:\Deploy\MySharePointSolution.wsp
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename “D:\Deploy\MySharePointSolution.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name MySharePointSolution.wsp –url http://myspwebapp –immediate
stsadm –o deletesolution –name MySharePointSolution.wsp
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolutionD:\Deploy\MySharePointSolution.wsp
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath “D:\Deploy\MySharePointSolution.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp
Remove-SPSolution–Identity MySharePointSolution.wsp

Working with features

Similarly, commands exist for working with features. The stsadm equivalents:
stsadm –o activatefeature –name MyFeatureName –url http://myspwebapp
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Disable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp