Friday, November 20, 2009

Importance of PortalSiteMapProvider in WCM?

PortalSiteMapProvider provides a nice automatic caching infrastructure for retrieving list data. The class includes a method called GetCachedListItemsByQuery that was used in this test. This method first retrieves data from a list based on an SPQuery object that is provided as a parameter to the method call. The method then looks in its cache to see if the items already exist. If they do, the method returns the cached results, and if not, it queries the list, stores the results in cache and returns them from the method call.
SPQuery strQuery = new SPQuery();
strQuery.RowLimit = 1;
//Retrieve the items for the specified Target location from the Target list
strQuery.Query = "CAML query...";
PortalSiteMapProvider ps = PortalSiteMapProvider.WebSiteMapProvider;
PortalWebSiteMapNode pNode = ps.FindSiteMapNode(web.ServerRelativeUrl) as PortalWebSiteMapNode;
SiteMapNodeCollection pItems = new SiteMapNodeCollection();
pItems = ps.GetCachedListItemsByQuery(pNode, "targetListName", strQuery, web);
//Check if there are items for the specified target location
if (pItems.Count != 0)
{
try
{
//Retrieve the most recently created item for the specified Target location from the list
foreach (PortalListItemSiteMapNode pItem in pItems)
{//TODO}
catch (Exception ex)
{}
}

Monday, November 9, 2009

How to install Visual Studio 2010?

If you are a MSDN subscriber, you can download Visual Studio 2010 from here.
If you want to know how to download and install Visual Studio 2010 watch Channel9 video.
To get you started, head over to MSDN and read some of the walkthroughs on SharePoint Development in Visual Studio 2010.

Tuesday, November 3, 2009

How to Display SAP Preferred Welcome Name?

I got the requirement that based on preferred name the welcome name should come.
Go to Shared Services Administration: SSP1 > User Profile and Properties > View User Profiles
Modify ur preferred name as per screenshot

Refer How to modify profile properites
Go to My site click on details link and modify ur name filed with ur prefer name.

Run the below cmd

After the sync has been performed the User Info table will be updated with the values from the My Profile details.