Skip to main content

Posts

Importing SharePoint 2007 list templates into SharePoint 2010

I have a requirement to move a SharePoint lists from SharePoint 2007 to SharePoint 2010. To resolve that I just go to lists settings in SharePoint 2007 and click "Save list as template" link, it will gives me a .stp file. When I tried to create a list based off that template I got the following error: Error Microsoft SharePoint Foundation version 3 templates are not supported in this version of the product Correlation ID: {random guid} Date and Time: ....   After goggling this issue I resolve that problem. So if you need to migrate list templates STP's from SharePoint 2007 to 2010, you could try the following: 1.    Rename the original .STP to .CAB 2.    Extract its manifest.xml to a local folder (lets call it {workingfolder}) 3.    Search for the ProductVersion element. This should have a value of 3 4.    Change its value to 4 5.    Repackage the manifest.xml into a .CAB. I've done this by using...

Office 2010 and SharePoint 2010 Service Pack 1 Availability

Here's extract of text from msdn blog on what are the major changes going to come in SharePoint 2010 SP1 Schedule to be released in June 2011 We are thrilled to announce the availability of Service Pack 1 (SP1) for our 2010 family of products. The SP1 release is important because it provides us with an opportunity to address customer feedback as well as the security, stability and performance of our 2010 wave of products. The release underscores our commitment to improving the quality of our software over time. We are grateful to those customers and partners who have taken time to provide us the feedback that makes our products and services better. SP1 contains all Cumulative Updates and Public Updates for 2010 that have already shipped . SP1 also contains new fixes for areas of each product. For those of you seeking a complete list of changes for each product contained in SP1, please visit this Excel Workbook – this is a very handy reference for those building t...

Authentication with SharePoint Online and the Client Side Object Model

I was searched on Remote Authentication in SharePoint Using the Client Object Model and I found a good article on MSDN Blog With the Office 365 Beta opening not long ago people are starting to test the waters with regards to custom development and seeing what they can do etc…   We put out the SharePoint Online developers guide here to try and assist with that: http://msdn.microsoft.com/en-us/library/hh147180.aspx However, one of the topics not addressed directly in that paper is how you can use the Client Side Object Model (CSOM) to interact with SharePoint Online.  You might want to do this if you are writing an application that wants to store or talk with data stored in SharePoint Online for example. The CSOM allows you to do this in an easy to use manner by providing a library you can use to make calls to SharePoint, however, by default the CSOM doesn’t handle SharePoint Online’s authentication system. To address this gap we have published a paper and accom...

Custom Audience Targeting SharePoint 2010

Today I will  show how to create , compile Audiences using code and as well will show how to find whether a logged in user belongs to the Audience or not 1. Creating a new audience First thing we'll do is creating a custom audience, giving it two rules, joined with an OR operator. public void CreateNewAudience() { string audienceName = "Test and temp"; //audience name string audienceDesc = "Only the test and temp users."; //audience description SPServiceContext  context = SPServiceContext.GetContext(SPContext.Current.Site); AudienceManager audManager = newAudienceManager(context); AudienceCollection audCollection = audManager.Audiences; Audience audience = null; AudienceRuleComponent audRule = null;         audience = audCollection.Create(audienceName, audienceDesc);         audience.AudienceRules = new ArrayList();//initialize the collection /* An AudienceRuleComponent exists of:   ...

Get Distincit values from SharePoint list

The GetDistinctFieldValues method can only be used for Text fields. The following code example uses the GetDistinctFieldValues method to return a two-dimensional object array representing values from the Title field of a specified list and then iterates through the array to display unique values. SPSite siteCollection = SPControl.GetContextSite(Context); SPList list = siteCollection.AllWebs["Site_Name"].Lists["List_Name"]; SPField field = list.Fields["Title"]; object[,] columnItems; uint numberValues = list.GetDistinctFieldValues(field, out columnItems); for (int i=0; i<numberValues; i++) {     string uniqValue = SPEncode.HtmlEncode(columnItems.GetValue(0, i).ToString());     Label1.Text += uniqValue + "<BR>"; }

Hide Title column in custom List Defination from ONET.xml file

We can not remove Title column, we can only hide the Title column by implement this piece of xml in your ONET.xml file (for Type "0" List). <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" ReadOnly="TRUE" Required="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title"> </Field> <Field ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" Name="LinkTitle" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitle"> </Field> <Field ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" Name="LinkTitleNoMenu" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitleNoMenu"> </Field>

Benefits of using SharePoint Sandbox Solution

The main benefits of using sandboxed solutions are as follows: Solutions can be added to a production SharePoint Server 2010 environment without the risk of affecting processes outside the sandbox. Site collection administrators can deploy sandboxed solutions, freeing farm administrators from this task. Scalability and flexibility are increased because sandboxes run in separate process that can be restricted by quotas, and their effect on the farm can be monitored. A solution does not have to be modified or recompiled if it is moved from a sandbox to running directly on the farm.