Skip to main content

Posts

Showing posts from March, 2011
Using the SharePoint Search “Best Bet” feature to redirect to a landing page. http://techmikael.blogspot.com/2011/01/using-sharepoint-search-best-bet.html

Creating Custom Timer Job in SharePoint 2010

http://dotnetfinder.wordpress.com/2010/07/24/creatingcustomsharepointtimerjob2010/ http://msdn.microsoft.com/en-us/library/ff798313.aspx Adding To add a solution to the  Farm  solution store use the  Add-SPSolution  cmdlet: Add-SPSolution –LiteralPath "C:\Deployment\MySharePointSolutionPackage.wsp" To add a  Sandboxed  solution  use the  Add-SPUserSolution  cmdlet: Add-SPUserSolution –LiteralPath "C:\Deployment\MySharePointSolutionPackage.wsp" –Site http://webapplication/sitecollection   Installing To install ( commonly known as deploy)  a  Farm Solution  we use the  Install-SPSolution cmdlet: Install-SPSolution –Identity MySharePointSolutionPackage.wsp –WebApplication http://webapplication  –GACDeployment To install ( commonly known as deploy)  a  Sandboxed Solution  we use the  Install-SPUserSolution  cmdlet: Install-SPUserSolution –Identity MySharePointSolutionPackage....

Workflow status codes (used for view filter)

Here is the list of the status codes used to maintain the workflow statuses. This list might be useful when anyone creates a view based on workflow status. If you are creating a view for a list filtered by the workflow status, you would need use the number rather than the words (e.g. 2 instead of In Progress, 4 instead of Cancelled etc) Status Value Not Started 0 Failed on Start 1 In Progress 2 Error Occurred 3 Canceled 4 Completed 5 Failed on Start (retrying) 6 Error Occurred (retrying) 7 Canceled 15 Approved 16 Rejected 17

Change browser icon in SharePoint 2010

To generate the icon files you can use the below link http://tools.dynamicdrive.com/favicon / copy the download image to your layouts folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\CompanyName Find the below in your master page and replace the new icon url. <SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/images/CompanyName/favicon.ico"/>

Hide the Upload Multiple links in the upload.aspx page

Hide the Upload Multiple links in the upload.aspx page this is one of the easiest way to hide this from the script <script type="text/javascript" > if(document.location.href.match("Upload.aspx") =="Upload.aspx") { var hlink= document.getElementsByTagName("a"); for(var i=0;i<hlink.length;i++) { if(hlink[i].id.match("UploadMultipleLink") =="UploadMultipleLink") { hlink[i].style.display="none"; } } } </script>

SharePoint 2010 Search Results in Tabular Format

http://sharepoint2010search.codeplex.com/

Common Date Time formulas for Sharepoint – Calculated Fields

Get Week of the year =DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time]))+0.5-WEEKDAY(DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])),2)+1 First day of the week for a given date: =[Start Date]-WEEKDAY([Start Date])+1 Last day of the week for a given date: =[End Date]+7-WEEKDAY([End Date]) First day of the month for a given date: =DATEVALUE(“1/”&MONTH([Start Date])&”/”&YEAR([Start Date])) Last day of the month for a given year (does not handle Feb 29). Result is in date format: =DATEVALUE (CHOOSE(MONTH([End Date]),31,28,31,30,31,30,31,31,30,31,30,31) &”/” & MONTH([End Date])&”/”&YEAR([End Date])) Day Name of the week : e.g Monday, Mon =TEXT(WEEKDAY([Start Date]), “dddd”) =TEXT(WEEKDAY([Start Date]), “ddd”) The name of the month for a given date – numbered for sorting – e.g. 01. January: =CHOOSE(MONTH([Date Created]),”01. January”, “02. February”, “03. March”, “04. April”, “05. May” , “06. June” , “07. July” , “08. August” ...

Configuring Enterprise Search in SharePoint 2010

please find the below link mr.  George Khalil   blog detail explanation http://sharepointgeorge.com/2010/configuring-enterprise-search-sharepoint-2010/

FAST Search Server for SharePoint 2010

Installation And Configuration Of FAST Search Server for SharePoint 2010 http://blogs.msdn.com/b/spses/archive/2010/04/09/installation-and-configuration-of-fast-search-server-for-sharepoint-2010.aspx Programmatically accessing FAST Search admin features http://blogs.msdn.com/b/jorgeni/archive/2010/03/08/programmatically-accessing-fast-search-admin-features.aspx Search scopes in FAST Search for SharePoint http://blogs.msdn.com/b/jorgeni/archive/2010/02/26/search-scopes-in-fast-search-for-sharepoint-part-1.aspx http://blogs.msdn.com/b/jorgeni/archive/2010/03/11/search-scopes-in-fast-search-for-sharepoint-part-2.asp x SharePoint 2010 Search : not showing any results for anonymous users ? http://blogs.msdn.com/b/sowmyancs/archive/2010/07/16/sharepoint-2010-search-not-showing-any-results-for-anonymous-users.aspx

The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly

If you see this message in the Crawl log of a content source, make sure that the site(s) it is crawling are accessible from the  index server . Often one of the following has happened: The web.config file of the crawled web application contains an error. Especially if the crawl was working yesterday and suddenly it stopped, check the web.config file on the Index server by loggin on to the index server, browse the site and check for errors. Remember to edit the web.config to show detailed error messages (search for ‘stack’ and turn the stack trace to ‘on’, next search for ‘errors’ and turn to ‘off’. Browse again. Sometimes there are solutions which change the web.config through either: web.config.merge.xml file as part of the solution (you will find them in the CONFIG folder) or through the object model. Like adding your own custom navigation provider entry and so on. Duplicates in the web.config file (like duplicate trust level entries) etc are not allowed. The target site colle...

Method to get the no.of working days between two dates excluding weekends

public static int CalculateBusinessDays(DateTime startDate, DateTime endDate) { //Check if Start Date is greater than end date, return -1 if (startDate > endDate) return -1; DateTime dateTemp; int weekDays = 0; int weekEnds = 0; TimeSpan tsDiff = endDate.Subtract(startDate); //Calculate number of weekend days between two dates for (int i = 0; i < tsDiff.Days; i++) { dateTemp = startDate.AddDays(i + 1);//starting from next day of starting date if (dateTemp.DayOfWeek == DayOfWeek.Saturday || dateTemp.DayOfWeek == DayOfWeek.Sunday) weekEnds++; } weekDays = tsDiff.Days - weekEnds; return weekDays; }

To convert Text column to Date column format in Sharepoint column

Suppose you have a column(named,"DateText") with text format and the value it returning is of type datetime("2009-06-18T00:00:00"), To convert it into datetime format(mm/dd/yyyy), first create a calculated column named Expiration Date, with datatype as datetime and with the follwing formula: =IF(ISNUMBER(FIND("T",[DateText])),TEXT(LEFT([DateText],FIND("T",[DateText])-1),"mm/dd/yyyy"),TEXT([DateText],"mm/dd/yyyy")) Then create one more calculated column with DateTime data type and use the following formula: =DATE(YEAR([Expiration Date]),MONTH([Expiration Date]),DAY([Expiration Date]))

Troubleshooting User Profile Service

Rational Guide to implementing SharePoint Server 2010 User Profile Synchronization “Stuck on Starting”: Common Issues with SharePoint Server 2010 User Profile Synchronization http://technet.microsoft.com/en-us/library/ee721049.aspx

Sharepoint Error Message: “Your client does not support opening list with windows explorer”

I received the following message, when I tried to open document library in Windows explorer view:  “Your client does not support opening list with windows explorer” OS: Windows Server 2008 SP2 (x86) Browser: IE 7 The solution: By default, “Web Client” service is not installed with Windows Server 2008, you need to install “Desktop Experience” from Server Manager > Features (If you are working on Multiserver Architecture then you need to enable it on all the web frontend servers)

Hide SharePoint Columns in New / Edit / View Form

Hide SharePoint Columns in New / Edit / View Form Open the SharePoint Designer 2010, Go to the Corresponding List/ Library. Open the New/Edit / View Item Aspx Page in Edit In Advance Mode add the Following script <script language= "javascript" type= "text/javascript" > _spBodyOnLoadFunctionNames.push( "hideFields" ); function findacontrol(FieldName) { var arr = document.getElementsByTagName( "!" ); // get all comments for ( var i=0;i < arr.length; i++ ) { // now match the field name if (arr[i].innerHTML.indexOf(FieldName) > 0) { return arr[i]; } } } function hideFields() { var control = findacontrol( "Title" ); control.parentNode.parentNode.style.display= "none" ; control = findacontrol( "Document Link" ); control.parentNode.parentNode.style.display= "none" ; control = findacontrol( "PublishDate" ); ...