EndUserSharePoint 2010 » Toni Frankola http://www.endusersharepoint.com/EUSP2010 Just another WordPress weblog Tue, 26 Jun 2012 13:21:30 +0000 http://wordpress.org/?v=2.9.2 en hourly 1 Configure Item Level Permissions for Document Libraries – Part 2 – SharePoint 2010 edition http://www.endusersharepoint.com/EUSP2010/2010/04/09/configure-item-level-permissions-for-document-libraries-%e2%80%93-part-2-%e2%80%93-sharepoint-2010-edition/ http://www.endusersharepoint.com/EUSP2010/2010/04/09/configure-item-level-permissions-for-document-libraries-%e2%80%93-part-2-%e2%80%93-sharepoint-2010-edition/#comments Fri, 09 Apr 2010 14:05:24 +0000 Toni Frankola http://www.endusersharepoint.com/EUSP2010/?p=292 Guest Author: Toni Frankola
SharePoint Use Cases

Every once in a while your customer might ask you to customize permissions for a document library in such a way that authors can only change their own documents. There was no such feature for document libraries in SharePoint 2007, and the “problem” is still present in v2010. (Both versions support automatic item-level permissions OOTB for other lists like Tasks).

In Part 1 of this article I tried to solve the problem for SharePoint 2007 with Workflows, but never found the time to complete it and create custom workflow activities for SharePoint Designer. In 2010, SharePoint Designer comes to the rescue, as it has similar workflow activities OOTB!

In this article we will examine how you can create a workflow that will customize item permissions for each document submitted to a document library (only the Author will have contribute permissions). These SharePoint Designer 2010 workflow activities can also be used in various workflow scenarios where permissions need to be revoked after an item is submitted (e.g. Annual Leave Requests, various approvals etc.).

Here is what you need to do:

  • Create a new Document Library (e.g. Top Secret Documents)
  • Go to Document Library Settings > Permissions for this document library
  • Click on the Stop Inheriting Permissions command from the ribbon

  • Revoke permissions for all but a few important groups (e.g. Portal Owners and Portal Members).
    Please note: Steps 2. – 4- are optional but the workflow is going to be much simpler if there are fewer permissions to manage
  • Open your site in SharePoint Designer, and select theWorkflows option and your list from the ribbon

  • Type the name for the new workflow (e.g. Customize Permissions)
  • Insert a new Impersonation Step. This special step runs each activity as workflow author.
    Make sure the workflow author (you) has proper privileges to manage permissions for this list.

  • From the list of workflow actions choose “Replace Item Permissions
  • Click Replace these permissions

  • In the dialog click Add
  • In the Choose permission to grant dialog click Contribute, and then click the Choose… button
  • Add User who created current item to the Selected users list
  • Click the workflow name (e.g. “Customize Permissions”) to manage workflow settings

  • Make sure you have selected the correct Start options

  • Publish your workflow

Once a user adds a document to a document library this workflow will revoke permission from other users and grant contribute permissions to the document author.

You can also customize this workflow and add permissions for other users as well.

Guest Author: Toni Frankola
SharePoint Use Cases

Toni started his Web adventure in late 90’s and has been working with various web technologies ever since. These days his main focus is SharePoint technology. He is active in the SharePoint community via his SharePoint blog at http://www.sharepointusecases.com/ and Twitter http://twitter.com/tonifrankola, and also speaks about SharePoint at various SharePoint conferences. Toni runs his own company Acceleratio Ltd., that specializes in SharePoint consulting and developing software products, and leads the Croatian SharePoint User Group. 

]]>
http://www.endusersharepoint.com/EUSP2010/2010/04/09/configure-item-level-permissions-for-document-libraries-%e2%80%93-part-2-%e2%80%93-sharepoint-2010-edition/feed/ 3
Introduction to SharePoint 2010 SandBox Solutions for Site Collection Owners http://www.endusersharepoint.com/EUSP2010/2010/04/05/introduction-to-sharepoint-2010-sandbox-solutions-for-site-collection-owners/ http://www.endusersharepoint.com/EUSP2010/2010/04/05/introduction-to-sharepoint-2010-sandbox-solutions-for-site-collection-owners/#comments Mon, 05 Apr 2010 14:00:20 +0000 Toni Frankola http://www.endusersharepoint.com/EUSP2010/?p=252 Guest Author: Toni Frankola
SharePoint Use Cases

If you have been reading about exciting new features of SharePoint 2010 you’ve probably heard about something called SandBox Solutions. In this post I will try to explain what SandBox Solutions are and how you, as a Site Collection Owner / End User / Non Developer type, can benefit from these solutions.


In a nutshell, SandBoxed solutions allow you to:

  • Deploy custom code you have developed or downloaded from the Internet
  • The custom code you deploy cannot jeopardize the stability of your farm
  • Solutions are being deployed via web interface
  • If you are running SharePoint in a hosted environment you will be able to deploy SandBoxed solutions there as well

SandBox Solutions support the following SharePoint item types:

  • List definitions
  • List instances
  • Content Types/Fields
  • Navigation
  • Web Parts derived from WebPart
  • Event receivers
  • Custom Workflow Actions
  • Workflows

For full list check SharePoint Dev Wiki.

Hello World Web Part

So let’s try to deploy our first custom SandBoxed solution web part. I have developed one for you. It comes with two simple web parts.

To deploy it:

  • Download the solution package to your computer
  • Open your SharePoint 2010 site collection
  • Go to Site Actions > Site Settings > Galleries > Solutions
  • Click Upload Solution from the Solutions ribbon
  • Once uploaded make sure you have Activated the solution

To insert this custom web part go to a web part page, choose Edit, then Insert a web part. Web parts you just deployed will be in the Custom group.

Insert the Hello World web part to your page. It will render as something like this:


Once deployed, you might ask: Well Toni, this is nice, but I could create this using only JavaScript/JQuery.

Yes you could do that, but in the next few articles I will show you some stuff you cannot do. The other important benefit is the ability to download/purchase 3rd party web parts and deploy these without any risk.

Very bad Web Part

So let’s do something you shouldn’t do at home :) . In the solution package you just deployed there is another web part named Very Bad WebPart. This one is going to try to write „Romeo loves Juliet“ an indefinite number of times on a web part page. But don’t you worry, if it is deployed as a SandBox Solution there is no way it can put your farm in any kind of danger.

Once deployed to a web part page it is going to be rendered as:


SharePoint 2010 SandBoxed solutions run as an isolated and monitored process. In case an unusual operation like the one above is detected the process will finalize its execution.

Monitoring SandBox Solutions

As a Site Collection administrator you can monitor resource usage of the SandBox solutions via Site Actions > Site Settings > Galleries > Solutions. The simple dashboard shows how much resources have been consumed by deployed solutions. To learn more about SharePoint resource usage configuration click here.


Interested in SandBox Solutions? Stay tuned as I will be posting some interesting samples in the next few posts.

Guest Author: Toni Frankola
SharePoint Use Cases

Toni started his Web adventure in late 90’s and has been working with various web technologies ever since. These days his main focus is SharePoint technology. He is active in the SharePoint community via his SharePoint blog at http://www.sharepointusecases.com/ and Twitter http://twitter.com/tonifrankola, and also speaks about SharePoint at various SharePoint conferences. Toni runs his own company Acceleratio Ltd., that specializes in SharePoint consulting and developing software products, and leads the Croatian SharePoint User Group. 

]]>
http://www.endusersharepoint.com/EUSP2010/2010/04/05/introduction-to-sharepoint-2010-sandbox-solutions-for-site-collection-owners/feed/ 0
Creating filtered lookups in SharePoint 2010 with InfoPath 2010 http://www.endusersharepoint.com/EUSP2010/2010/03/18/creating-filtered-lookups-in-sharepoint-2010-with-infopath-2010/ http://www.endusersharepoint.com/EUSP2010/2010/03/18/creating-filtered-lookups-in-sharepoint-2010-with-infopath-2010/#comments Thu, 18 Mar 2010 03:28:59 +0000 Toni Frankola http://www.endusersharepoint.com/EUSP2010/?p=85 Guest Author: Toni Frankola
SharePoint Use Cases

One of the usual challenges with SharePoint 2007 was to build a lookup field between two lists but also apply a custom filter to the values being displayed.

Let’s consider a simple scenario: You have two lists on your site: Projects and Project Tasks. You want to link each task in Project Tasks list with a project in Projects list. This was simple even in v2007, you only had to create a lookup column and you were good to go.

But what if you wanted to link tasks with only active Projects (each project has a Yes/No column indicating if it is active), that was a bit more challenging.

Let’s check how you can solve the problem with SharePoint 2010 (Enteprise edition only). Here is what you need to do:

  1. On a SharePoint site create one custom list Projects with two columns: Title and Active (Yes/No column). You can add additional columns if you need them.
  2. Use Tasks list list template and create a list Project Tasks. Add one additional Lookup column connected to the Projects list (do not select “allow multiple values”)

SharePoint is going to create all the required forms for you. The default form for Project Tasks will look like this. The problem is, it shows inactive projects.


To change this, follow these steps:

  1. Open your list. In the List Tasks > List Ribbon click Customize Form button. You must use IE to use the button. You will perform form customization with InfoPath 2010.

  2. In the InfoPath form designer right click on Project field and click on the Drop-Down list properties option.

  3. On the newly opened dialog click Add button

  4. You need to create new connection to receive data from the Projects list. Select Create a new connection to: Receive Data. Click Next >.

  5. Select SharePoint library or list as your source. Click Next >.

  6. Type in the URL of your SharePoint site. Click Next >.

  7. Select the Projects list you created before. Click Next >.

  8. From the fields list, select the following fields: Title, and Active. Select to sort by Title. Click Next >.

  9. Click theNext button a few times to finalize this wizard. Once completed you will be taken back to the properties dialog.

    Select ID field as value field. Click the button Next to Entries field, then Select a Field or Group dialog should appear.

  10. On the Select a Field or Group dialog click on the Filter Data… button

  11. On the filter dialog, create a filter as shown on the picture below. This will force the drop down to load only active projects.


Close all dialogs and save the changed form. When you go back and try to create a new item in your list, the projects dropdown will only show active projects.



Conclusion

This article describes how you can create a filtered lookup for SharePoint 2010. It is easy to use and no code is required to make it work. A pure end user solution. There are some limitations: it does not resolve the problem of updating old Tasks that have already been assigned to inactive projects. It also only works with Enterprise edition. In future blog posts I will try to create some alternatives for SharePoint foundation.

Guest Author: Toni Frankola
SharePoint Use Cases

Toni started his Web adventure in late 90’s and has been working with various web technologies ever since. These days his main focus is SharePoint technology. He is active in the SharePoint community via his SharePoint blog at http://www.sharepointusecases.com/ and Twitter http://twitter.com/tonifrankola, and also speaks about SharePoint at various SharePoint conferences. Toni runs his own company Acceleratio Ltd., that specializes in SharePoint consulting and developing software products, and leads the Croatian SharePoint User Group. 

]]>
http://www.endusersharepoint.com/EUSP2010/2010/03/18/creating-filtered-lookups-in-sharepoint-2010-with-infopath-2010/feed/ 4