Skip to main content

Posts

Collection of SharePoint 2010 resources

Here are the links to some of the resources available for SharePoint 2010. I'll keep updating this post as and when I come across new resources. SharePoint 2010: IT Pro Evaluation Guide SharePoint 2010 Walkthrough Guide Technical Diagrams SharePoint 2010 Advanced Developer Training SharePoint 2010 Advanced IT Pro Training SharePoint Server 2010 capacity management: software boundaries and limits Capacity Management and Sizing for SharePoint Server 2010 Topologies for SharePoint Server 2010 SharePoint Server 2010 performance and capacity test results and recommendations Databases That Support SharePoint 2010 Products

Event ID: 6398

I used to get the following error in event log: The Execute method of job definition Microsoft.SharePoint.Search.Administration.SPSearchJobDefinition (ID 80d7c9cb-ece6-4631-9d61-5fa1a0e8596c) threw an exception To resolve this, I did the following simple steps: Go to Run command in SharePoint Server Type Services.msc and enter Locate "Windows SharePoint Services Search" Right-click on it and select "Stop" Right-click on it and select "Properties" Navigate to Log On Ensure it is running under domain account. Type the correct password Click OK In Services window, right-click on "Windows SharePoint Services Search" and select "Start" Now, the above error message is gone! Source: eggheadcafe.com

The SSP Timer Job Distribution List Import Job was not run

I used to get this error very often in Event Log: The SSP Timer Job Distribution List Import Job was not run. Reason: Logon failure: unknown user name or bad password After a quick search in net, I found the resolution for this. It is a simple 3 steps: Here, "newPassword" is the password which you use it for MOSS account. 1. On the machine where Central Administration resides, execute the following command: stsadm -o updatefarmcredentials -userlogin "domain user" -password "newPassword" 2. iisreset /noforce (optional) 3. Execute the following command: stsadm -o updateaccountpassword -userlogin "domain user" -password "newpassword" -noadmin It solved the problem! You can get more information here .

How to make a List column read-only

Use the below code: using (SPSite mySite = new SPSite("siteURL")) { using (SPWeb myWeb = mySite.OpenWeb()) { SPList myList = myWeb.Lists["ListName"]; SPField myField = myList.Fields["ColName"]; myField.ReadOnlyField = true; myField.Update(); } } With this code, the column becomes read-only. This column does not appear while adding new item or editing existing item, and also in the list of columns in List settings. But, you can add this column to a view, so, user can see the data. Also, programmatically, you can add/update a value to this column (That means, it is set to read-only from SharePoint UI point of view) One use of this approach is when you want to introduce auto-generated number column.

Renaming Type column in List

This question was posted in MSDN forum. How to rename Type column in a perticular List. In GUI, there is no option to rename the column. However, we can achieve this programmatically. Let's see the code: using (SPSite mySite = new SPSite("http://server/mySite/")) { using (SPWeb myWeb = mySite.OpenWeb()) { SPList myList = myWeb.Lists["ListName"]; SPField myField = myList.Fields["Type"]; myField.Title = "MyType"; myField.Update(); } } Here, in the perticular site and the list, get hold of "Type" field. Change the Title to whatever you want and call Update method. Now, refresh your List view! You can see the column name as "MyType"!

Adding Adobe PDF icon to Document Library

I was playing around with a document library. I uploaded a PDF file to the document library and I noticed that it displayed a white icon next to the PDF item instead of PDF icon which we see in our system. After digging more into this, here is how I got it resolved: Let's do step by step: Download the PDF icon from Adobe website (I chose 17x17 icon) Save the above GIF image into "12\TEMPLATE\IMAGES" folder Go to "12\TEMPLATE\XML" folder and open DOCICON.XML Under ByExtension tag, add a Mapping element for PDF GIF image. Key = "pdf" Value = "pdficon_small.gif" Save DOCICON.XML file Do IISRESET Refresh your page. Bingo! For all PDF files, it displays the correct PDF icon!