Thursday, 25 August 2011

Easily determining the exact error by using Correlation ID in SharePoint 2010

Have you encountered an error that looks like this screenshot below?

Well if you develop items in Sharepoint then most probably you had seen that not just once but a lot of times unless you are a really good developer that does not commit any mistakes.

Now you are presented with a GUID without any other information so you might be wondering what the hell that means, so you Googled your problem and saw some solutions on how to determine what does that Correlation ID means by going to the server and in this folder location

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

and whoalla! you see a ton of logs that Sharepoint had generated over time.

You then opened the log specific to time when your issue happened and to your surprise that GUID is non existent. To your dismay you searched other logs that are near to the time your issue happened but still there’s not luck. Well there are other easier means in searching for what you want and that is through the Microsoft SharePoint 2010 Administration Toolkit v2.0.

That toolkit have some of the tools you need for diagnosing issues like such plus more, it has Load Testing Toolkit, User Profile Replication, Content Management Interoperability Services and much more. Viewing logs is never
been easier as the results are presented in a much meaningful way. So how do I use the tool to check what that correlation ID means? Well here are the steps:

1. Install the tool in your server or even in your local machine that can connect to that server, installation file can be downloaded here for free. Once downloaded installation is straightforward.

2. Once installed, its time to create your project. First find the application on your start menu then go to SharePoint 2010 Administration Toolkit -> SharePoint Diagnostic Studio. Open that then click new project, you will then be presented with a screen similar to below, put your server name on the text box then hit “Create Project”. Be patient it will take sometime to process that.

3. Once finished you will be presented with this screen, with some information. In other slower servers you might see it a bit later and it will show “building report please wait…” but don’t worry its processing at the background also please take now if there’s no data it retains that message.

4. Now you can start searching for your issue by clicking the search button on top.

5. Populate the needed text boxes and hit OK

6. Now you will be presented with what you are looking for.


Wednesday, 24 August 2011

SharePoint 2010 - Field element list and attributes

Here's the link "official" list of Field Elements available for SharePoint 2010 and their respectively attributes:

MSDN Field Element List


Friday, 19 August 2011

Custom Validator for CheckBoxList

Here's a custom validador for a CheckBoxList, that i used the other day:




using System.Web.UI.WebControls;

namespace SPTips.CustomValidador
{

public class CheckBoxListsValidator : BaseValidator
{


protected override bool ControlPropertiesValid()
{
Control ctrlToValidate = FindControl(ControlToValidate);
return (ctrlToValidate != null);
}


protected override bool EvaluateIsValid()
{
ListControl ctrlToValidate = FindControl(ControlToValidate) as ListControl;
if (ctrlToValidate != null)
{
return ctrlToValidate.SelectedIndex != -1;
}else
{
return false;
}
}
}
}




Cheers.

Thursday, 11 August 2011

SharePoint 2010 CSS Reference Chart

Este artigo dá muito jeito sem dúvida, a Heather também um artigo idêntico sobre o 2007, como já deve ser do vosso conhecimento... Abraço!

Create a SharePoint List from an Excel


From my point of view, one of the most difficult things to do on SharePoint is to know which out-of-the-box features exist and mapping them to client requirements for the sake of not reinventing the wheel.

For example, imagine that your client wants to create a button to upload an Excel to create and populate a SharePoint list.

Well, that functionality already exists.

Open your Excel (i'm using 2007) and create some data:


Now, select those cells and click on the ribbon, tab Home, option Format as Table, and chose a layout for your table.
A windows will open. Select the My table as headers option.


Now with your table formatted, go to Ribbon, Design tab and click the arrow bellow the Export option. Chose the Export to a SharePoint list option.
Fill in the necessary information and click next.

If need, give your credentials for accessing the site. Check the Data Types for your columns and if all is well click Finish.

Now navigate to your site. You should have a new list created, which the default view is a Data Sheet View (unless your browser doesn't support ActiveX controls, in that case a standard view will be presented).

Good Luck ;)

Wednesday, 10 August 2011

Iusesharepoint.com


Check out this Microsoft site:

http://sharepoint.microsoft.com/iusesharepoint/landing.aspx

A fun site with some tips & tricks for SharePoint 2010.

Cheers

Tuesday, 9 August 2011

Live SharePoint Data Out Of The Box

I posed a question this morning about how many people knew about the live data feature in SharePoint views.

The what?

Yeah, you can configure a view to do live updates. It's a new feature in SharePoint 2010 but one that removes the need for additonal JavaScript code to do it for you. Here's how to do it.

  1. Pick a view you want to see live data for (or create a new view) and navigate to that page.
  2. Click on Site Actions in the menu and choose Edit Page
  3. Select the List View Web Part on the page and open up the Edit Web Part menu to bring up the properties for the web part

There's a new section you'll see in the Web Part Properties pane:

Click on Enable Asynchronous Refresh and set the interval to refresh the data (default is 60 seconds). Click OK and sit back and watch your list view update automagically!

Simple and sweet. Jan Tielens has a larger writeup on this little known feature here. It's sad that people don't know this feature is there and free, as in beer. Now, go forth and refresh your listviews without postbacks!

Tuesday, 2 August 2011

SharePoint 2010 - User Profile Service Application

The User Profile Service Application is a powerful SharePoint 2010 feature.

It's objective is to gather and centralize information about individuals.It also enables the social features of SharePoint 2010.


User Profile Service Application features:

  • User Profiles: Provides set of properties of individuals in an organization, along with their respectively social tags and other items.

  • Social Tags and Notes: with this feature, users can now tag SharePoint items (documents, blogs posts...).


  • My Sites Host: provisioning of the site for My Site feature, as for the rest of the social "tools";


  • My Site: provisioning of personal sites for the users (with some nice "Facebookish" features);


  • Organization Profiles: gathering of information about a given organization (departments,..);


  • Audiences: enable target content to users based, for example, on their hierarchy within the organization;


  • Profile Synchronization: Mechanism for synchronize the profile's information with the master information repositories (e.g. AD's);

For more information, click here.



Implementing User Profile Service Application
Installing and activating the User Profile Service Application, may not be an easy or very straightforward task (e.g. given the correct permissions for application users).
I strongly recommend following this guide:

http://www.harbar.net/articles/sp2010ups.aspx

(credits to Spencer Harbar for helping so much people with the above article).


Cheers.