Monday, December 19, 2011

Social Ratings and Timer Jobs

Social Rating is a new feature in SharePoint 2010. It allows users to rate a content on the scale of 1-5. However, if you have noticed, when you rate a content and refresh the page, the rating will disappear or does not reflect. This happens because the tables from where the rating data is fetched are not updated by Timer Jobs.

If you want to see the data immediately, run the following Timer Jobs:

1. Go to Central Administration.
2. Click on Monitoring.
3. Click on Review Job Definitions
4. Look for the following Jobs and run each:
a. User Profile Service Application - Social Data Maintenance Job
b. User Profile Service Application - Activity Feed Job
c. User Profile Service Application - Social Rating Synchronization Job

Now, refresh your application page and Ratings are reflected! You can also change the frequency/schedule of the above Timer Jobs and accordingly Ratings gets reflected automatically.

Thursday, June 3, 2010

What is SharePoint 2010?

Here is a good article on SharePoint 2010. It explains briefly about six pillars of SharePoint 2010. This article should give you an idea on what you can expect from SharePoint 2010.

Tuesday, March 23, 2010

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:

  1. Go to Run command in SharePoint Server
  2. Type Services.msc and enter
  3. Locate "Windows SharePoint Services Search"
  4. Right-click on it and select "Stop"
  5. Right-click on it and select "Properties"
  6. Navigate to Log On
  7. Ensure it is running under domain account. Type the correct password
  8. Click OK
  9. In Services window, right-click on "Windows SharePoint Services Search" and select "Start"

Now, the above error message is gone!

Source: eggheadcafe.com

Friday, March 19, 2010

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.

Wednesday, February 3, 2010

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.

Sunday, January 24, 2010

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"!