Skip to main content

Posts

Showing posts with the label SharePoint 2010 For Beginner

SharePoint 2013 Pagination Options Google/Bing/etc

Google, Bing pagination on SharePoint search result page only two step away.  OOB Pagination Control options  Start Position When user click to the “2” page to the previous and next button will appear The total number of page will display on pagination control at a time is 6. So the page number 1 is not visible 1) Export Search Results Web Part: Number of pages in pagination UI is controlled by two variables in the Search Results web part: <property name="MaxPagesBeforeCurrent" type="int">7</property> <property name="MaxPagesAfterCurrent" type="int">7</property> You will now get this: To get the UI to always go back to Page 1: 2) Source code added to Search Display Template Control_SearchResults.html starting on about line 399. <!--#_ //max before current page - ctx.ClientControl.$1K_4 //current page - ctx.ClientControl.$14_4 // if page 1 no longer shows in the pagination ...

Log4Net Custom Logger for SharePoint 2010 and 2013 (With Attached working Code)

What is the Problem The big problem in SharePoint 2010/2013 to write the custom error to log files, whenever the error comes, the developer grab the associate correlation GUID and see the associated error in 14 hive folder. The log file also contains the bunch of other information as well. It would be great if somehow I can develop the custom logging feature for our project that is only specific to my project. It will reduced my effort and it would be a big win for me as a developer. Solution we would able to solve this problem by using 3rd party open source DLL “log4net” . We have written some custom classes to override the base function that would help us to write SharePoint logs into the 14 hive. These classes contain the logic for generating the logs under the same location, where the SharePoint logs are generated i.e 14 hives under different folder (This will help to get the exact information during the error and trace). Solution Dependency Log4Net Dll Important C...

SharePoint 2010 Hide Ribbon using JQuery in "EnabledScript"

Problem Understanding: In SharePoint ribbon control there is “EnabledScript” parameter that used to enable and disable the icon from the ribbon based on the condition logic in your method. So the requirement is to hide the button from the ribbon instead of disabled it. Requirement: Hide the button from the ribbon instead of disables it. Solution: In SharePoint ribbon control there is “EnabledScript” parameter that used to enable and disable the icon. So in this function I decided to hide the ribbon control using JQuery. Here comes the problem the ID of the icon is     “ DATA.SharePoint.Ribbon.NewControlInExistingGroup.NotifyLarge ” and it contains the “.” So to escape the “.” We required to add the “\\” in front of “.”. Implementation: So the following Script that I used to hide the ribbon icon. In this code I checked the controlexistId control existence and based on the logic I hide the icon. EnabledScript = "javascript:EnableDisable() function EnableDisa...

SharePoint Software Limitations

Following are the limitation of SharePoint software. Limit Maximum Value Limit Type Web application 20 per farm Supported Zone 5 per web application Boundary Managed path 20 per web application Supported Solution cache size 300 MB per web application Threshold Application Pools 20 per farm Supported Number of content databases 500 per farm Supported Content database size (general usage scenarios) 200 GB per content database Supported Content database size (all usage scenarios) 4 TB per content database Supported Content database size (document archive scenario) No explicit content database limit Supported Content database items 60 million (includes documents and items) Supported Site collections per content database 10,000 Supported Site collections per farm 750,000 Supported Web site ...

SharePoint 2013 Types Of APP

SharPoint 2013 type of Apps SharePoint Hosted App Cloud Hosted App SharePoint Hosted App: There are two types of Apps that you will be created depending upon the type of solution you need. The first type called “SharePoint Hosted”. Apps that include only SharePoint components and that are installed on the customer's own SharePoint Online tenancy or its own on-premises SharePoint farm. SharePoint-hosted apps for SharePoint are installed on a SharePoint 2013 website, called the host web, and that have their resources hosted on an isolated subsite of a host web, called the app web.  The client side resources such as webpage client side JavaScript code which are served by the SharePoint Host.  This type of application you can create using either using the “Napa” online App or another option you have Visual studio 2013 template which fully support the App model. With Napa you unable to creates the SharePoint other elements such as content type, list instanc...

SharePoint 2013 Install-SPSolution with CompatabilityLevel Parameter

While installing new WSP to farm with Power Shell I found there are two folders "14" and "15" hive. You still able to install the WSP in older version based on the version you use; So in Install-SPSolution  power shell command let  there is a parameter called " CompatabilityLevel  " in sharepoint 2013 that used to installed the SharePoint solution feature in both "14" and "15" hives depend your requirement. Following are the list of table showing the values. Following are the list of values available Value Result 14 Installs solution to 14 directories only 15 Installs solution to 15 directories only “14,15” Installs solution to both 14 and 15 directories “AllVersions” or “All” Installs solution to both 14 and 15 directories “OldVersions” or “Old” Installs solution to 14 directories only “NewVersion” or “New” Installs solution to 15 directories only This command let help not available you need t...

Types of Features in SharePoint 2013

Feature/Site Template Association: Allow to associate new features and functionality with existing site definition configuration feature automatically included in the provisioning(Microsoft).  Can Associate the feature with Global Site template (event receiver to the site creation to write your custom code) Provide a Feature “Stapling” Attach a feature to existing site template Facilitating a versioning and reusability <FeatureSiteTemplateAssociation Id="29D85C25-170C-4df9-A641-12DB0B9D4130" TemplateName="STS#0" /> Data structure of SharePoint Site : Site Column and Content type Field : Creates the custom fields <Field ID="string" Name="string" Type="string">mixed</Field> Content Type: Create the content type. <ContentType>mixed</ContentType> Content Type Binding: Associate the content type with list. <ContentTypeBinding /> List/Libraries Features :  List Template (once ...

Implement telerik in SharePoint 2010

Overview: This post helps to implement the Telerik controls in SharePoint 2010. At the end of this post you will find the source code. This example contains the two Telerik controls Treeview [Code snippets taken from the official Telerik site] Rotator [Code snippets taken from the official Telerik site] To Implement the Telerik in SharePoint 2010. Follows the below steps Create [ Empty SharePoint Project ] and give solution name [ SharePoint2010Telerik ]. Create folder in the solution [ Assembly ]. Copy two dll [ Telerik.web.design.dll ] and [ Telerik.web.UI.dll ] (You can download two dlls from telerik official site or The sample code at the end of this post also contains the same files) Add above two dll inside the package. From the solution explorer double click to the package.package icon inside package folder. Scroll to down click to the [ advanced ] button. The Additional assemble windows open click Add button the drop menu comes clic...

Co-authoring in SharePoint Server 2010

Co-authoring in SharePoint Server 2010 addresses these issues by making it possible for multiple users to work on a document, at any time, without interfering with each other's changes. This approach streamlines many common document-collaboration scenarios. For example: Two or more authors are working on different parts of a composite document. While one author works on his section of the document, another author can work on hers, without either interrupting their work. Several authors are working on a composite slide show. Each author can add slides to the presentation and edit them, instead of working in isolation and trying to merge several documents and make them consistent all at the same time. A document is sent out to several experts and stakeholders, each of whom has some edits or additions. No user’s edits are lost, because they are all working on a central, server-stored document. Microsoft Defination Co-authoring Office 2010 and Office Web Apps products : Seve...

SharePoint 2010 : Sandbox Solution Part 4 Full Trust Proxy

Full Trust Proxy:  Sandboxed solution to execute an action that is ordinarily not available to sandboxed solutions . One of these techniques is to create a special kind of operation that runs in a full trust process, but that can be called from a sandboxed solution. The operation is deployed as a farm solution by a farm administrator who trusts it and is prepared to let sandboxed solutions call it. These operations are called   full-trust proxy operations. ( Microsoft Definition ). Other words: Full trust proxy is a farm solution that runs Outside the Sandbox Solution.  Sandbox Solution uses that assembly and call Execute method to perform the operation which was out the scope of sandbox solution. The class inherits from SPProxyOperation .  Full trust Proxy Input parameters used as serialize class (used “Serializable” attribute) that inherits from SPProxyOperationArgs  Register proxy with User Code Service during Feature activation.  ...

SharePoint 2010 Replaceable Parameters, Dynamic Tokens, Dynamic Folder Path

Replaceable Parameters : Replace the tokens values at the run time or compile time. Information not known at design time. Replaceable parameters used in custom actions, assembly name defined at the top of the custom web part control.     Following are the list of Replaceable Parameters. $SharePoint.Project.Assembly.FullName$ $SharePoint.Feature.ID$ {ItemId}   {ItemUrl}  {SiteUrl}  {ListId}   {RecurrenceId} Working following files that use  Replaceable   Parameters by default. Xml  ASCX  ASPX  WebPart  DWP Dynamic Token (Microsoft Definition) ~masterurl This token references a master page from a content page by using the MasterPageFile attribute with the value of the CustomMasterUrl property. The token "~masterurl/custom.master" is replaced at run time by the value in the CustomMasterUrl property, which contains the server-relative full path to the master page, inc...