Posts

SharePoint General Questions ans Answers

SharePoint Interview Questions and Answers Q What is SharePoint? Ans SharePoint is a browser based document collaboration platform given by Microsoft. Q What are features of SharePoint 2010? Ans Some features are : ·          Document Collaboration ·          Enterprise Search FAST Search ·          New Enhance Web Part ·          Ready made Silver Light web part ·          Business Connectivity Services ·          Social Media Investments ·          Large lists ·          Enhanced collaboration features ·          Visio Services ·          Usage reporting and logging ·          Better Network Differencing & SharePoint Offline in SharePoint Workspace ·          High Availability/ Disaster Recovery Innovation ·          Admin Insights through the Logging & Usage database, and dev dashboard ·          Service Applications ·          SharePoint Designer Enhancements like portable workflows, and gran

How to use multi value paramter in SSRS Report for SharePoint 2010?

I wanted to create a report in which I have created a Parameter called "User Name" , Which shows all users from SharePoint list. Now I marked this parameter as Multi value selector. But I am not able to use values of this parameter in SSRS report because this report uses CAML Query not SQL query. When I select 1 or more users and click on 'View Report' button. It gives me an error : Cannot add multi value query parameter 'Users' for dataset 'TSADataSet' because it is not supported by the data extension. (rsErrorAddingMultiValueQueryParameter) So I used this parameter in filter option of Data Set. Now it is working fine. I just followed these steps : Create multi-value parameter as you want. Right click to “ your dataset ” then click on “ Dataset Properties ”. In Dataset property form, Click on “Filters” and add expression (Field) then select Operator (Select “In” operator in case of multivalue parameter) then select value (Click on form

Microsoft released 10 new SharePoint themes

Image
Microsoft released 10 new SharePoint themes you can download these theams from : Download them from Microsoft

Backup & Restore sites with stsadm command

For Backup :     http://technet.microsoft.com/en-us/library/cc287967.aspx     For site collection backup stsadm -o backup -url <URL name> -filename <file name> [-nositelock] [-overwrite]   For Restore : http://technet.microsoft.com/en-us/library/cc288929.aspx   For site collection restore   stsadm -o restore -url <URL name> -filename <file name> [-hostheaderwebapplicationurl] <Web application URL> [-overwrite]   To Take Backup of Site C:\Progra~1\Common~1\Microsoft Shared\Web Server Extensions\14\BIN> stsadm -o backup - url http://testserver/sites/sitename -filename c:\backup\bk.dat    To Restore Whole Site C:\Progra~1\Common~1\Microsoft Shared\Web Server Extensions\14\BIN> stsadm -o restore - url http://server/sites/newsite -filename c:\backup\bk.dat If you want to overwrite existing web site then use -overwrite .    

Remove Social Tags Ribbon Control

Image
If you want to remove "I like It" , "Tags & Notes " Then just follow these steps : Open Central Administration Click on System Settings Click on Manage Farm Features (_admin/ManageFarmFeatures.aspx) Deactivate the Social Tags and Note Board Ribbon Controls OR You can deactivate this feature by Power shell command : SharePoint 2010 Management Shell Disable-SPFeature –Identity SocialRibbonControl

Increase Upload Size & request timeout period

First, increase the Maximum Upload Size for a specific web application. Go to the Central Administration > Application Management > Web Application General Settings Specify the new maximum upload size for your webapplication. For now, we are setting it to 256MB. It could be even set upto 2GB. Your second step should be to try increasing your default chunk size of large files by trying this STSADM command: Stsadm.exe –o setproperty –pn large–file–chunk–size –pv        This basically denotes the chunk of data that can be read from SQL Server at one time.     The -pv which determines the property value stands for the upload size in bytes (B).     It could be set to a maximum of 2GB i.e. (2,147,483,648 B).     Do an IISRESET Next, in web.config file of your particular web application, under the httpRuntime tag in system.web section, increase the upload limit to match the value that you set earlier in central administration. You also need to add the execution timeout to allow mo

Security Trimmed Controls in SharePoint

Let’s say you have a control on your page that you want only a certain group of users to see. Fortunately, SharePoint has a built-in control that lets you hide controls to which users do not have the necessary permissions.  This control is the SPSecurityTrimmedControl. <Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”ManageLists”> Place your control(s) here </SharePoint:SPSecurityTrimmedControl> All you have to do is wrap your control with this security control and set the correct permissions in the Permissions attribute. The Permissions attribute, when used in Visual Studio or Designer, will have intellisense and will be filled with the following properties obtained from http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx .  Whatever permissions you specify will be required by the user in order to view the control(s) inside of the SPSecurityTrimmedControl:   Member name  Description EmptyMask

Enabling a Button on the Ribbon Based on Selection

Image
Enabling a Button on the Ribbon Based on Selection A lot of people have asked me how to create a button which enables if and only if a single item is selected. This isn’t something we have out of the box, but the code to get this functionality is pretty simple. I’m going to assume that you’re generally familiar with SharePoint, CustomActions, and customizing the Ribbon – if that’s not the case, you’d probably be better off researching those things before delving into this. Basically, the enabling behavior all boils down to the following few lines of code: EnabledScript = " javascript:function singleEnable() {   var items =     SP.ListOperation.Selection.getSelectedItems();   var ci = CountDictionary(items);   return (ci == 1); } singleEnable(); " What this does is query to get the dictionary of selected items, and if the size of the dictionary is 1 it returns true (enable), otherwise it will return false (disable). Technically,

How To Hide Ribbon From Users Without Edit Page Privilege

 A way to remove or hide the ribbon area from user with lease privilege, and here is how: 1)       Open your SharePoint master page 2)       Locate this line: < div id ="s4-ribbonrow" class ="s4-pr s4-ribbonrowhidetitle"> 3)       Change it to: < div id ="s4-ribbonrow" class ="s4-pr s4-ribbonrowhidetitle" style =" display :none" > 4)       Now find the end of the “ s4-ribbonrow ” tag and add following block right after it: < Sharepoint : SPSecurityTrimmedControl ID ="SPSecurityTrimmedControl2" runat ="server" PermissionsString ="AddAndCustomizePages">     < script type ="text/javascript">         document.getElementById( "s4-ribbonrow" ).style.display = "block" ;     </ script > </ Sharepoint : SPSecurityTrimmedControl > 5)       Save the new master page and publish it. Learn more about SPSecurityTrimmedControl

How to Remove Corrupted SharePoint Sites – Preparing for SharePoint 2010 Upgrade

  SP2 had a number of enhancements designed around making it easier to upgrade to SharePoint 2010.  One such new feature that wasn’t popularized is your ability to find and remove corrupted, broken sites known as orphans. As I’ve mentioned in the past, with SharePoint being split across multiple databases, it is quite possible that a site could be in either the content database OR the config database. With service pack 2 there’s a new way to find orphaned sites.  In addition to running STSADM –o PreUpgradeCheck , one of my favorite tools along with TEST-SPContentDatabase with SharePoint 2010 you can identify these messed up corrupted sites. You’ll run enumallwebs (STSADM reference on TechNet) to identify the orphaned sites, and use deletesite (STSADM reference on TechNet) to remove them.  Note this command is available in SP2, and was enhanced in the post SP2 October Cumulative update.  You really should consider that October update as the most significant release with