Monday, June 11, 2012

Anonymous access in SharePoint 2010 Survey

Filling up survey form in SharePoint is one of the common tasks that we perform. However when we want to capture a feedback in terms of survey but we would not like to know the name of a person who responded to survey then anonymous survey comes into the picture.

We directly cannot create a SharePoint 2010 anonymous survey. First we need to configure the site to have an anonymous site and then we can configure survey list to allow anonymous access.

First we need to make a setting in central administration. Go to Manage web applications->Select your specific web app->Click on zone type Default->then check the enable anonymous access.

Here are these steps shown as screen shots.






Now select anonymous policy from the ribbon and select None.



Now open your site to enable anonymous access. You can see this option only when you have set the anonymous option from the central administration.



You need to set where you would want to enable the anonymous access.


I’ve selected lists and library because we want to create an anonymous survey.

Open your survey list where you want to configure anonymous survey. First step that needs to be performed is to break the inheritance from the parent site. Without this step, we cannot configure anonymous survey.

Go to list settings and then permissions for a list and then click on anonymous access. This model page allows you to configure the action that anonymous user can perform. However you might see all options grayed out.





The reason behind this is strange, however these is a work around to this. Go to advance settings option of the list and then select read all responses.




Now again go back to the permission and then select anonymous access. You should be good to go for setting up the permissions.





Now the problem is we do not want other people to see other’s responses although created by field is always empty when we enable the anonymous survey, but still we do not want any person to read any other person’s response.

So go back to advance settings and now change from real all responses to read responses that were created by user.

And there you go, give link URL to respond to anyone and they should be able to respond to a survey. At the same time created by field will always be blank so that we never come to know who responded to survey.



Friday, June 8, 2012

Export and Import a SharePoint List


This was a requirement one of my clients faced few days back. So I thought of writing blog post on it so anybody can refer to it when needed .



Exporting a SharePoint List can be done with the OOB feature given in SharePoint Central Administration.



Central Administration >> Backup and Restore >> Export a site or list







In the above image you can see…

1. You can backup a site

2. You can backup a list

3. It supports of exporting with full security

4. Exporting with the item versioning (Major / Minor / Both / Current)







OK fine exporting can be done through the UI. How about Importing? Time to move on to PowerShell. Prior to that let’s see how to achieve the Exporting through PowerShell.



Export-SPWeb “http://spdev:4422/netassist/” –ItemUrl “Lists/Students” –Path “C":\SharePoint Backup\StudentsList.cmp”



Now the Importing.. (I’ve used a SubSite “network” for the clarity)



PS C:\Users\SPAdmin> Import-SPWeb “http://spdev4422/netassist/network/” -Path "

C:\SharePoint Backup\StudentsList.cmp"



For more info read the TechNet Articles.

Export

Import



Deploy Project Server 2010 on SharePoint 2010

By any chance if you come across the requirement of installing and configuring Microsoft Project Server 2010, technet has provided a nice and easy guide of deploying Project Server 2010.

http://technet.microsoft.com/en-us/library/cc197280.aspx

In this section:

•Deploy Project Server 2010 to a server farm environment

This series of articles describes the steps necessary to install Microsoft Project Server 2010 in a server farm environment. This includes installing and configuring Project Server, creating a Microsoft Project Web App site, and configuring reporting.

Deploy Project Server 2010 to a test environment

This series of articles describes deploying a test installation of Microsoft Project Server 2010 in a virtual environment. The purpose of this series is as follows:

•Install Project Server 2010 to a stand-alone computer

Microsoft Project Server 2010 can be installed in a stand-alone configuration that uses Microsoft SQL Server 2008 Express. This configuration is useful for demonstration, but should not be used for a production environment.

•TechNet Webcast: Project Server 2010 upgrade and migration

This Microsoft TechNet Webcast discusses Microsoft Project Server 2010 features, requirements, and deployment considerations that IT professionals need to know about.

•TechNet Webcast: Project Server 2010 - Backwards Compatibility Mode

This Microsoft TechNet Webcast discusses the Microsoft Project Server 2010 Backwards Compatibility Mode (BCM) feature, which helps you to accelerate deployment of Microsoft Project 2010.

•In-place upgrade to Project Server 2010

This article describes the process of doing an in-place upgrade from Microsoft Office Project Server 2007 to Project Server 2010.

Database-attach full upgrade to Project Server 2010

This article describes how to do a database-attach full upgrade to Project Server 2010, in which you back up the required databases in the old farm and then restore them in the new farm.

•Database-attach core upgrade to Project Server 2010

This article describes how to do a database-attach core upgrade to Project Server 2010, in which you are basically using backup copies of your Office Project Server 2007 databases that contain your project data.

•Virtual migration environment (VME) guide for Project Server 2010

The Project Server VME is a virtualized Office Project Server 2007 environment that contains all the necessary applications and utilities required to migrate Microsoft Office Project Server 2003 data to Office Project Server 2007. To migrate from Project Server 2003 to Project Server 2010, first you must migrate your data to Office Project Server 2007 format.

•Upgrade to Project Server 2010 from Project Server 2003

This series of articles provides information and procedures about how to migrate from Microsoft Office Project Server 2003 to Project Server 2010.

•Deploy language packs (Project Server 2010)

Microsoft Project Server 2010 language packs enable Project Server 2010 users to view Microsoft Project Web App and project sites in multiple languages without requiring separate installations of Project Server 2010.

•Deploy Project Server 2010 with Exchange Server

These articles describe how to configure integration with Exchange Server, enabling Microsoft Project Server 2010 users to view Project Server tasks in Microsoft Outlook

Thursday, November 17, 2011

Enhancements for SharePoint 2010

There are a number of platform and tool enhancements for SharePoint 2010.

I picked out a few favourites which I briefly explain below:
  • LINQ to SharePoint (Language Integrated Query)
  • Data Platform Improvements
  • List Enhancements
  • Business Connectivity Services
  • Silverlight Integration
  • Managed Client Object Model
  • Sandbox Solutions
  • Visual Studio 2010 for SharePoint
  • WSP Changes
  • Developer Dashboard
  • Dialog Framework
  • SharePoint Designer 2010
  • Visio Services
  • InfoPath (changes)
  • Windows PowerShell
LINQ to SharePoint (Language Integrated Query)
LINQ is a feature of the programming languages C# and Microsoft Visual Basic .NET. Compilers are included with Visual Studio.
LINQ adds a SQL-like syntax and vocabulary to each of the languages, which can be used to query data sources. But unlike other languages and query syntaxes which vary from one type of data source to another, LINQ can be used to query, in principle, any data source whatsoever. For this reason, developers may find that it is the only query syntax that they ever need to know.
The LINQ to SharePoint Provider is defined in the Microsoft.SharePoint.Linq namespace. It translates LINQ queries into Collaborative Application Markup Language (CAML) queries. more details here...


Data Platform Improvements
The data platform improvements include: List Relationships, Unique Column Constraints, Data Validation, Column Formula Validation, etc
more details here... 

List Enhancements
The list enhancements in SP2010 include: Bulk Operations, New capacity limits(more details here..), XSLT Views (more details here..)

Business Connectivity Services (BCS)
BCS is a set of services and features that provide a way to connect SharePoint solutions to sources of external data and to define external content types that are based on the external data. External content types resemble content types and allow the presentation of and interaction with external data in SharePoint lists (known as external lists), Web Parts, Microsoft Outlook 2010, Microsoft SharePoint Workspace 2010, and Microsoft Word 2010 clients. External systems that Microsoft Business Connectivity Services can connect to include SQL Server databases, SAP applications, Web services (including Windows Communication Foundation Web services), custom applications, and Web sites based on SharePoint. more details here... 

Silverlight Integration
In Windows SharePoint Services 3.0, you could host a Microsoft Silverlight application in a Web Part. Microsoft SharePoint Foundation 2010 goes beyond by providing a built-in, extensible, Silverlight Web Part specifically designed to host Silverlight applications. Closely related to the new Web Part is Silverlight Cross-Domain Data Access (Silverlight CDA) that enables secure, cross-domain, integration between Silverlight applications and SharePoint Foundation deployments, and Silverlight CDA can be used by non-Silverlight external applications as well. more details here...

Managed Client Object Model
The SharePoint Foundation 2010 managed client object model lets you write client-side code to work with all the common objects in SharePoint sites. Through the object model, you can add and remove lists, add, update, and delete list items, change documents in document libraries, create sites, manage permissions of items, and add and remove Web Parts from a page.
With the SharePoint Foundation 2010 managed client object model, you can design client applications that access SharePoint content without installing code on the server that runs Microsoft SharePoint Foundation 2010. For example, you can build new categories of applications that include writing applications that are based on the Microsoft .NET Framework, rich interactive Web Parts, Microsoft Silverlight applications, and ECMAScript (JavaScript, JScript) applications that run client-side in a SharePoint Web Part.
more details here...

Sandbox Solutions
You can deploy a Microsoft SharePoint Foundation 2010 solution directly onto your SharePoint Foundation farm, or you can deploy the solution into a sandbox. A sandbox is a restricted execution environment that enables programs to access only certain resources, and that keeps problems that occur in the sandbox from affecting the rest of the server environment. 
Solutions that you deploy into a sandbox, cannot use certain computer and network resources, and cannot access content outside the site collection they are deployed in.
more details here... and here.

Visual Studio 2010 for SharePoint
A number of areas for SharePoint developers in Visual Studio 2010 are worth mentioning. First, you get SharePoint project templates in the box, so you can start right away on solution development. Second, tooling has standardized on the Windows SharePoint Package (WSP) packaging standard, so when you import or deploy a solution to SharePoint, Visual Studio treats it as a solution package. Third, some great deployment and packaging features, such as solution retraction and custom deployment configurations, ship with the SharePoint tools in Visual Studio 2010. And last, the new SharePoint Explorer provides a view into native and custom artifacts (for example, lists and workflows) that exist on your SharePoint server.

WSP Changes
SharePoint 2010 improves the WSP format so that it is supported across all tools, allowing you to export your site through the browser, SharePoint Designer, and Visual Studio. This means that you can quickly upgrade or downgrade your solutions between the tools.
SharePoint Online, the Microsoft - hosted version of SharePoint, supports this format so that you can move solutions to the cloud without having to rework the package.

Developer Dashboard
The developer dashboard is a new feature in SharePoint 2010 that is design to provide additional performance and tracing information that can be used to debug and troubleshoot issues with page rendering time. The dashboard is turned off by default, but can be enabled via the object model or stsadm (and PowerShell too, I just haven’t put together the script for it yet). When the dashboard is turned on you will find information about the controls, queries and execution time that occur as part of the page rendering process; this information appears at the bottom of the page.

Dialog Framework
SharePoint 2010 has a new framework for showing dialogs to the end-user. The dialogs allow people to work with some data without losing focus on the page they were working on to get things done. Closing the dialog will often cause AJAX based refreshes to give a sense of stateful-ness.
The dialog is of course extensible through JavaScript code. You can either show a separate page, or use a DOM element on the source page and show that. You can then determine when the dialog closes and what happens when it has closed.
more details here...

SharePoint Designer 2010
There have been a large number of changes to SharePoint Designer. 
For a nice overview go to this post

Visio Services
Visio Services in Microsoft SharePoint Server 2010 is a service application that lets users share and view Microsoft Visio Web drawings. The service also enables data-connected Microsoft Visio 2010 Web drawings to be refreshed and updated from various data sources. 
Visio Web drawings (*.vdw files) can be rendered by Visio Services and viewed in a Web browser. This lets users view Visio documents without having Visio or the Visio Viewer installed on their local computer. Basic exploration and navigation of these rendered Web drawings are supported within the Visio Web Access Web Part. Page designers can configure the user interface and functionality of the Web Part. 
Visio Services can also refresh the data and recalculate the visuals of a Visio Web drawing hosted on a Microsoft SharePoint Server 2010 site. This enables published Web drawings to refresh connections to various data sources and to update affected data graphics and text fields. more details here...

InfoPath 2010 (changes)
InfoPath 2010 comes with a large number of enhancements which includes: 
Easy customization of list forms with InfoPath, an InfoPath Form Web Part, Forms with code-behind can be deployed using sandbox solutions, creating a site template will produce a WSP package which includes the InfoPath forms, Forms Services forms now support WCAG 2.0 standard, InfoPath forms can be made available offline using SharePoint Workspace 2010, Forms Services also support FireFox and Safari. 
more details here... and here. 

PowerShell for SharePoint 2010
Windows PowerShell is a command-line scripting tool that provides an administrator full access to applicable application programming interfaces (APIs), along with the ability to unlock the capability to interact directly with SharePoint 2010 Products to manipulate Web applications, site collections, sites, lists and much more. In addition, the administrator has the ability to script cmdlets (pronounced "command-lets"), which makes for an improved experience from past product versions.  more details here... and here

Other enhancements (not covered in this post):
Access Services
Central Administration (Redesigned)
Digital Asset Management
Enterprise Search
Excel Services
Health Monitoring
Managed Metadata
PerformancePoint Services
Enhanced Records Management
Changes to Social Computing (previous called Collaboration)
Upgrade

very nice and usefull for sharepoint 2010 blog

http://johanolivier.blogspot.com/2010/08/sharepoint-2010-ribbon-enabled-web-part.html

http://virtualizesharepoint.com/category/sharepoint-2010-search/

http://www.sharepointkings.com/2010/09/sharepoint-cascading-drop-downs-using.html

Saturday, September 10, 2011

SharePoint solution to deploy InfoPath Form template as administrator approved form template

An InfoPath form template can be published into SharePoint in many ways. Below are the options available to you when you try to publish an InfoPath Form from Microsoft Office InfoPath application.
  • Form Library: You can publish the info path form template as a template in a form library.
  • Site Content type: You can publish this form template into a library in a site collection which will then be accessible by a content type. This content type can be used by multiple libraries.
  • Administrator approved form template: Administrator can upload the form template in central admin form template gallery which can then be enabled into a specific site collection. When a template has been activated in a Site Collection, a copy of the template is stored in Site Collection “Form Templates” library which can be used by multiple sites, libraries within that site collection.
There might be times when you would want to be able to deploy/activate these form templates automatically via a SharePoint solution eliminating the manual processes. In this post, I will show you how you can package an InfoPath Form template into a WSP solution file and deploy it as administrator approved template. This will automatically, upload the template into the Central Admin Form Template gallery and also activate that form template to a Site Collection.
Tools: Microsoft Office InfoPath Designer 2010, Visual Studio 2010 Professional, SharePoint Server 2010
1) Create a new blank form using InfoPath Designer 2010 and add some controls to it. Mine looks like this.
2) Go to form options and in the security section, set the security level to “Domain”. Read more about the security level here.
3) Then you need to publish the form template. Mind you that we are not going to publish this form template directly into SharePoint server. This form template will be automatically published into SharePoint by our solution. So, we will publish this form template into a network location and include it in our SharePoint Solution.
Go to Publish section in InfoPath Designer and choose “Network Location”.
Select the published path with filename. Then go to next step.
Leave the input textbox blank and select next. You will receive a warning but you can ignore it for now.
After publish, you will get a screen like this.
4) You can now verify if this template can be uploaded into SharePoint server using “Upload form template” in central admin site.
select the published form template and then click verify. You should receive a message stating that the template is ready to be uploaded to the server.
5) Create a SharePoint 2010 project in Visual Studio 2010 and select “Module” to be added.
6) Opt to deploy as a farm solution
7) I’ve changed the name of the feature to “InfoPathDeploymentFeature”, “Module1” to “InfoPathFormModule” and also removed the default sample.txt file from the module.
8) Add the published InfoPathForm.xsn file, one we created earlier, under the “InfoPathFormModule” element. Select the xsn file and in the properties windows, under “Deployment Location” property, clear the path value. The Elements.xml file now looks like this.
9) Change the scope of the feature to “Site”. 
10) Double click the feature and in the properties window, set the values for “Receiver assembly” and “Receiver class” as below.
Receiver Assembly: Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Receiver Class: Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver
11) Check the SharePoint url where you are deploying this feature. Make sure that the feature “SharePoint Server Enterprise Site collection features” is already activated in that site. You can add feature activation dependency also.
12) Then in the packaging explorer, select the module “InfoPathFormModule”. Then you can add features properties from the properties window. These are very important, if you do not add them, the form will not be uploaded in central admin form templates gallery. The manifest will then look like this.
13) Buid and deploy the project.
Check the form templates in the central admin at this locaiton: Central Admin->General Application Settings->Manage form templates. you will see that the template has been uploaded.
You will also notice this form template has already been activated to the site collection where we deployed the feature.
Go to Site Settings->Site Content Type, you’ll see that a content type by the name “InfoPathForm” has been automatically created. This means that now, we can just add this content type into a form library which we can use to fill out our info path form through browser.
So create a new form library, change it to allow management of content types, and add the “InfoPathForm” content type to that library. The settings of content type will now look like this.
You will now see a new content type option available when we create new document which will open our infopath form in browser. But to enable the infopath forms to be displayed in browser, you need to configure the form library which you can do by setting the value of “Openinig document in browser” to “Open in browser” in settings of the library.

14) Lastly, click on the new content type in form library, which will open the info path form in a web page.

I have also uploaded the Visual Studio 2010 Project which you can downloaded. Also, I will follow up on this post with other enhancements like feature receiver that will automatically add InfoPath content type to form library, promoting InfoPath Form fields into form library columns etc.