Thursday, March 8, 2012

Sharepoint foundation 2010 - Item level permissions - filer lists in outlook

For this to work, you create the tasks list


Then open SharePoint Designer, open the list, create new workflow.


Create an impersonation step (Note: this step will run using the credentials you opened the SharePoint site with)


The following workflow is an example from some work I did, where we assign full control to only the assigned to person (or group).  I had to also add an additional step to also assign full control to another group (ADMIN), as the workflow would crash if I allowed multiple selection of groups/users for my assigned to column.




Let’s go through each step.

Set a variable equal to the Assigned to field for the current task list item


REPLACE the current task list item rights to Full Control for current Assigned To user/group.  Notice we used replace, this is important.



Then add same rights(as in B) for the ADMIN group, this is to ensure that we also have a group that we can put users into that can see everyone’s tasks.

Save the workflow, publish. Make sure you’ve set the start workflow on item create and change.  So when task is created, rights are assigned, also when task is changed, as assigned to may be changed, so we need to update the task.



Wednesday, December 22, 2010

Sharepoint Foundation 2010 - Create linked lists with header detail display

This will show how to create a header-detail relationship in SharePoint Foundation 2010.  In this tutorial, we will be creating a Orders/ OrderDetails relationship.

Let’s get started:
  1.       We need to create 2 lists and link them together.
a.       Create Orders list
b.      Site Actions > View All Site Content
c.       Click “Create”
d.      Select “Custom List”
e.      Give the list a name, let us call it “Orders”
f.        Click “Create”
g.       After page reloads, click “List Settings” top right on ribbon bar
h.      Scroll down to columns, click “Title” column, so that we can edit it.
i.         (make sure “Enforce unique values is set to YES)
j.         Rename column to “OrderNumber”
k.       Click “OK”
l.         Now click “Create column”
m.    Column Name: “OrderDate”, type = “Date And Time”
n.      Click “OK”

a.       Create OrderDetails  list
b.      Site Actions > View All Site Content
c.       Click “Create”
d.      Select “Custom List”
e.      Give the list a name, let us call it “OrderDetails  ”
f.        Click “Create”
g.       After page reloads, click “List Settings” top right on ribbon bar
h.      Scroll down to columns, click “Title” column, so that we can edit it.
i.         (make sure “Enforce unique values is set to NO)
j.         Rename column to “Qty”
k.       Click “OK”
l.         Now click “Create column”
m.    Column Name: “Product”, type = “Single Line of Test” (Could also be a lookup)
n.      Click “OK”
o.      Again,  click “Create column”
p.      Column Name: “OrderNumber”, type = “Lookup (information already on this site)”
q.      Get information from, select “Orders”
r.        In this column, select “OrderNumber”
s.       (There is the relationship behaviour which can help to maintain data integrity, but it outside of the scope of this quick tutorial)
t.        Click “OK”

2.       Create an  order  and add some orderdetails.  Make sure you select the ordernumber you created in orders when adding orderdetails.

3.       Select Orders from the lists.

4.       Select Site Actions > Edit Page

5.       Under Web Part Tools, select Options

6.       Select Insert related List, click “Orderdetails”



7. Now you have setup a header detail relartionship.



ORD002 selected, showing 0 line items in order detail

ORD001 selected, showing 2 line items in order detail