Allow Users to Create Surveys
Assistance from a person with SharePoint development experience might be required to develop this solution. However, if you're new to developing in SharePoint and wish to do this yourself, brace for a steep learning curve. Here are some
resources that might help:
The developers resource centre is here:
http://msdn.microsoft.com/en-us/sharepoint/dd367963.aspx
1. Setup a SharePoint development environment on a virtual environment.
Steps to do this can be found here:
http://blog.fpweb.net/how-to-setup-a-sharepoint-development-environment/ or
http://www.codersbarn.com/post/SharePoint-Development-Environment.aspx
2. Create a custom workflow that creates the survey and assigns permissions to it.
An example of how this workflow could be created can be found here:
http://www.simple-talk.com/dotnet/.net-tools/how-to-create-custom-sharepoint-workflows-in-visual-studio-2008/?utm_source=reflector&utm_medium=email&utm_content=SharepointVisualStudio20100106&utm_campaign=.NET Note this example
creates a list but use the bit that sends out an email. You will also need to swap the sequence of the two tasks to meet your needs (i.e. creation of the survey comes before sending the email). The link provided by Hemendra provides code for creating the survey
programmatically and can be used within the workflow and replaces the code for creating the list item.
Source code for setting the list permissions can be found on this article:
http://www.eggheadcafe.com/tutorials/aspnet/c3ac8915-3861-4406-bec7-42f2d9110d79/break-the-roles-in-sharep.aspx
3. Package the custom code into a wsp and deploy it to your test server. For this you will need:
http://wspbuilder.codeplex.com/
http://www.michaelbowersox.com/2009/01/18/intro-to-wspbuilder/
May 6th, 2010 3:02am