Chapter 7 – Working with Sharepoint Designer 2010

Wrox Real World Sharepoint 2010 (Page 205) 01/30/2011, 10:20PM

Sharepoint Designer 2010 WORKS ONLY WITH Sharepoint 2010.

Click the pin and you can preview the items in the section:

Logged in user. Click the icon (lower left) to see who the currently logged in user is. You can log in as a different user.

To configure Sharepoint Designer access, go to Central Admin à General Application settings à Sharepoint Designer. (first select the web application, then update SPD access rules)

If SPD access is enabled, you can select Site Actions à Edit in Sharepoint Designer

In Site Collection Administration, you can also allow/disallow SPD access:

When you open a page in SPD 2010, you see a Skewer Click in the ribbon. Click this button and select an element in the content, you can see the CSS used.

How to remove Recycle Bin and All Site Contents from the menu:

Open Master Page in SPD 2010, turn on Skewer Click, mouse over the area,…

Go to style tab, select CSS properties to display CSS properties.

Right click the style and select New Style Copy

This will copy the selected CSS into a new CSS. In the new style:

Once done, he two links are hidden.

In effect we created a new style that is slightly different from the old one – the visibility property is set to ‘Hidden’. (Page 224)

**** New Style Copy:
The new style is created inside the Master file, which is a recommended way of making style changes. Do not change the out-of-the-box CSS! You can also choose to have the CSS added to a separate file.

Forms —
Out o the box, most list forms in Sharepoint 2010 are ASP.NET forms, but with Sharepoint Enterprise 2010, it is possible to edit or create these forms using InfoPath.
To edit the form in InfoPath, click any list/library, and on the ribbon you see this button. You can customize the form by doing this.

InfoPath forms are automatically created for workflows when using Sharepoint server 2010. E.g., if you have a workflow that assigns a taks meant to be subkitted for approval, you could edit the task form and change it to provide more information.

Views and the XSLT List View Web Part —
Views are the primary way that content from lists and libraries is displayed to the user. In SPD 2010, you can click a list/library and go to the view section, and click on each view to update view

The views are based on XSLT List View Web Parts: With Sharepoint 2010, all forms are based on XSLT.

To create a new view, click the View button.

To set a current view as the Default View, click the button in the ribbon:

Editing Views and Forms with Sharepoint Designer —
(1) create a list with a few fields,
(2) customize the list form in InfoPath,
(3) edit the view to add conditional formatting, and
(4) create a custom view.

<1> Open SPD and connect to a site
<2> Click List and Libraries, and to create a new list, click “Custom List” in the ribbon. Name the custom list “Employee Review”.

<3> Go to the list’s settings/summary page, click “Edit List Columns” in the Customization section.

<4> Click “Title” and change it to “Employee Name”. Add a choice column by:

Enter 3 values as choices. Rename the column name to “Performance”

Add a third column, Comments, multiple lines of text

You have to click the Save button for the changes to stick.

<5> Now that the list is created, you can go to the web site and see the list:

<6> Now we want to modify the forms using InfoPath. In SPD, navigate to the list, open the list, and click Design Ofrms in InfoPath in the ribbon. Click “ITEM”.

<7> When the formis open in InfoPath, give a title, and remove the attachment row as we won’t use it.

<8> Once done, click the Quick Publish
button on the top:

<9> Now when you add a new item in browser, you see this form. (in either New or edit Mode)
<10> Now we can create custom view to help visualize and filter the data. Go to the list’s settings page. Click All Items View. In production, however, the best practive is to copy and create a new one.

<11> In the XSLT List View Web Part, remove the icon and keep the column.

<12> Then select the first cell

<13> While the cell is selected, click the button Conditional Formatting in the ribbon:

Enter this criteria:

and click “Set Style” to set the style for rows that matches this condition. Change the background color to green.

<14> Save it and go to the brwose to view the lsit. The employees that are “Exceeds Expectations” has green next to them:

<15> Lastly, to create a custom view that shows only yhe values of the employees who have a low rating.
<16> Go to the list, in the View section, click the new buton to create a new view. Called Low Rating. Edit it.
<17> Click the filter, and specify the condition:

<18> Browse the list, and you will see the new view:

<19> This view will display only the ones that does not meet expectation. Optionally, you can set style for this view (in this case, red). P.230

WorkFlows —
Sharepoint Designer 2010 supports the following workflow types:
(1) list workflow – directly assoicated with a list
(2) reusable workflow – can be associated with other lsits or libraries. Based on content type.
(3) site workflow – are not assoicate with a list or content type.
(4) globally reusable workflow – It is best to make copies and then modify.

SPD 2010 uses declarative rule-based workflows. Use conditions and actions to define the process. Click workflow in the navigation

Conditions: Rule and criteria that applied to the workflow. When started, the conditions are compared against the item being processed.
Actions: what activities are performed by the workflow. Such as, send email, or set a value in a field.

New workflow features:
(1) SPD 2010 supports Parallel Blocks – events can occur in parallel.
(2) Impersonation step —
(3) Lookup from Profile – can use user’s profile information in the workflow processing
(4) Modify the Out-of-the-box workflow – make a copy and modify!
(5) Import and Export Workflows to and from Visio 2010 —

Exercise: Creating a Site Workflow that Writes to a Custom List —
<1> Open SPD, click List and Libraries, click Workflow. Click Site Workflow to create a new site workflow.
<2> Name the workflow Employee Reviews and you see the designer.
<3> Before changing the workflow, click the Initiation Form button in the ribbon, and add a new field to the ini form, “Employee Name”, single line of text, empty default value.

<4> Create another parameter, Rating (choices), with 3 rating values.

<5> Ad another field, comments, multiple lines of text.
<6> While the blinking orange line is in the Step 1 box, click Actions
à Send an Email

Click these users to configure the email

<7> Click Action
à Create List Item

<8> Matching the parameters with the list items.

When finished:

<9> Next, Action
à Assign a to-do item

<10> Add a to-do item in someone’s task lsit. Define “someone” in the next step. Workflow will pause until this item is completed.

<11> Specify the user who will receive the task

<12> Completed workflow:

Save and Publish it.

<13> Testing the workflow –Go to web site, Site Actions
View All Site Contents
<14> on the top, click Site Workflow.

<15> Click Employee Reviews to start the work flow:

<16> You are prompted with an initiation form. Enter data.

<17> Then you will see the workflow inMy Running Workflow:

<18> Once you set the task status to “complete”, then the workflow will show “complete” in status.

Data Source —
Could be from Sharepoint, could be external data source such as SQL.
You can add a data source from an external SOAP data source:

Connecting to a Sharepoint web serivce with a Data View Web part —
<1> Click Data Source in the navigation, create a new Data source with SOAP connection
http://…./_vti_bin/webs.asmx?WSDL, select GetAllSubWebCollection to get all sites

<2> Once data source cretaed, create a web part site page: named AllSites.aspx

<3> First click inside the PlaceHolderMain to set focus, Data View à The data source you just created.

In the web part, you see a preview of all existing webs. Click the arrow of the first web, and make it a hyperlink.


Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: