Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook: Develop, debug, and deploy business solutions for SharePoint applications using Visual Studio 2010 with this book and ebook.

Arrow left icon
Profile Icon Balaji Kithiganahalli
Arrow right icon
R$306.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (4 Ratings)
Paperback Sep 2011 296 pages 1st Edition
eBook
R$80 R$245.99
Paperback
R$306.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Balaji Kithiganahalli
Arrow right icon
R$306.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (4 Ratings)
Paperback Sep 2011 296 pages 1st Edition
eBook
R$80 R$245.99
Paperback
R$306.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
R$80 R$245.99
Paperback
R$306.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

Chapter 2. Workflows

In this chapter, we will cover:

  • Creating a sequential workflow

  • Creating a site workflow with initiation form

  • Deploying an InfoPath form with a workflow

  • Creating a task from the workflow

  • Creating a custom task form

Introduction


According to Workflow Management Coalition (http://www.WFMC.org) a standards organization that solely concentrates on processes, defines a workflow as follows:

The automation of a business process, in whole or part, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules.

In simple terms, it means a workflow is a system that manages the execution of a business process. Organizations implement workflows for many different reasons such as:

  • Auditing and tracking

  • Better efficiency

  • Consistency

  • Better customer support

Whatever may be the reason for workflow implementation; it is implemented by breaking up the business processes into small activities and executed in a logical order.

An activity in a workflow is the smallest piece or item that you execute. Take for instance a business process that manages employee time and expense reporting (T&E). In here, when employee submits the T&E, a notification...

Creating a sequential workflow


In this recipe, we will learn how to create a sequential workflow. For this recipe, we will model a credit approval process. When a user adds an item to a list, we will let the workflow instantiate automatically on the inserted item and flow through the process of checking the user's requested credit line and approving it based on user's employment and credit history.

Getting ready

You should have a fully functional development machine with SharePoint 2010 installed and configured. You also need Visual Studio 2010 IDE installed on the same development machine. We are using a team site template for our examples.

Use the custom list template and create a list from the SharePoint user interface called Credit Approval. The following table provides information on fields and its properties:

Field Name

Data Type

Required

Credit Requested

Currency

Yes

Employment History

Choice (Choices - Good, Bad, and None Exists)

...

Creating a site workflow with an initiation form


The previous recipe is a good example of a sequential workflow where there is no human interaction. If it were really dealing with a credit approval process on a credit application, this could have gone through the external applications to verify the credit history and employment history and made the decision. So to take advantage of this automation, let us create our own credit application approval system. In this recipe, we will create a site workflow to enact our credit application approval process. Since site workflows are not associated with any lists, there is no form that we can get out of the box for a user to input data and start the workflow. For this purpose, we will also incorporate an initiation form that upon submission will start the workflow.

To keep the workflow simple, the workflow will base its decision on the credit amount requested. If the credit amount is less than $1000.00 it will be automatically approved or if it is...

Deploying an InfoPath form with the workflow


In this recipe, we will recreate the previous recipe to use InfoPath forms for initiation form.

Getting ready

This recipe assumes that you are familiar with creating InfoPath forms using InfoPath designer 2010. Your SharePoint server should be configured to use form services. Refer to MSDN at: http://technet.microsoft.com/en-us/library/cc262263.aspx for more information on configuring the form services.

How to do it...

  1. Using InfoPath designer, create a browser compatible form template.

  2. Add a textbox control and name it txtCreditRequested. Also add a Submit button.

  3. Go to the Submit Options of the button and add a new data connection to submit to the Hosting environment as shown in the following screenshot:

  4. From the File tab, click on the Form options button to open the options dialog box.

  5. Uncheck the Automatically determine security level (recommended) and select Domain (the form can access content from the domain in which it is located) security as...

Creating a task from the workflow


So far we created workflows that run automatically without stopping for user input in the middle of the process. Initiation or association data come before the workflow is started. There are many situations where in the middle of the workflow process you may want input from a user to proceed further. To do this, we will create tasks in SharePoint.

In this recipe, we will create an Employee Suggestion Program (ESP) workflow, where employees of a company can provide suggestions on the betterment of the business processes that are in place in the company. For this, when an employee suggests a process improvement, a task is assigned to the department director to take a look at and decide on the value of the suggestion.

Getting ready

Create a custom list from the SharePoint UI called ESP. The following table lists all the attributes of the fields in the list:

Field Name

Data Type

Required

Title

Single line of text

Yes

...

Creating a custom task form


In the previous recipe, when the department director completes the task, we cannot determine whether he wants the suggestion implemented or rejected. We may have to find out using the comments field as there is no other field that provides a way for him to convey that information. If the workflow has to take action based on this input, the default form provided will not fit the situation. We may have to create a custom form and present it to the user to perform their tasks. You can use either the ASPX page or InfoPath form to create the custom task form. In this recipe, we will create a custom InfoPath task form.

Getting ready

This recipe is an extension of the previous recipe. Hence, a successful completion of the previous recipe will provide a good foundation for understanding this. This recipe also assumes that you have working knowledge of designing InfoPath forms.

How to do it...

  1. Using InfoPath designer, create a form named TaskEditForm.xsn with a drop-down list...

Left arrow icon Right arrow icon

Key benefits

  • Create applications using the latest client object model and create custom web services for your SharePoint environment with this book and ebook.
  • Full of illustrations, diagrams and key points for debugging and deploying your solutions securely to the SharePoint environment.
  • Recipes with step-by-step instructions with detailed explanation on how each recipe works and working code examples.

Description

Microsoft SharePoint 2010, is the best-in-class platform for content management and collaboration. With the combined capabilities of Sharepoint and Visual Studio, developers have an end-to-end business solutions development IDE. To leverage this powerful combination of tools it is necessary to understand the different building blocks. This book will provide necessary concepts and present ways to develop complex business solutions and take them further.SharePoint 2010 Development Cookbook With Visual Studio 2010 is an instructional guide for developing and debugging applications for SharePoint 2010 environment using Visual Studio 2010. The cookbook approach helps you to dip into any recipe that interests you, you can also read it from cover to cover if you want to get hands on with the complete application development cycle.With this book you will learn to develop event handlers, workflows, content types, web parts, client object model applications, and web services for SharePoint 2010 in an instructional manner. You will discover the less known facts behind debugging feature receivers, deployment of web parts, utilizing free toolkits to enhance the development and debugging experience. You will learn the newer development approach called Visual Web Parts, how to develop and deploy Silverlight applications that can be used with Silverlight web part. You will also explore SandBoxed deployment model and its usage. You will create your own web services for SharePoint and the Client Object Model introduced in SharePoint 2010. All in all, you will develop Sharepoint solutions in an instructional manner that eases the learning process.

Who is this book for?

This book is for .NET developers to understand the building blocks for SharePoint 2010. Although the book can be used by beginners, it is recommended to have understanding of the previous versions of SharePoint. Developing SharePoint solutions needs solid understanding of ASP.NET architecture. The book assumes that the reader is familiar with ASP.NET technology and development concepts.

What you will learn

  • Develop client applications using all three Client Object Models and exception handling techniques
  • Explore visual web parts, Silverlight web parts, code-only web parts, connectable web parts, custom configuration properties for web parts, and AJAX-enabled web parts
  • Respond to list events, list item events, and feature events
  • Develop and deploy complex sequential and state machine workflows with InfoPath forms deployed as task forms and association forms
  • Create custom workflow activities and send alerts to the task owners
  • Create content types and link external data with business connectivity services
  • Understand the out-of-the-box web services and REST services available with SharePoint
  • Develop client applications to consume web services
  • Write custom WCF web service and consume it in a custom application
Estimated delivery fee Deliver to Brazil

Standard delivery 10 - 13 business days

R$63.95

Premium delivery 3 - 6 business days

R$203.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 23, 2011
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781849684583
Vendor :
Microsoft
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Brazil

Standard delivery 10 - 13 business days

R$63.95

Premium delivery 3 - 6 business days

R$203.95
(Includes tracking information)

Product Details

Publication date : Sep 23, 2011
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781849684583
Vendor :
Microsoft
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 852.97
Microsoft SharePoint 2010 Business Application Blueprints
R$272.99
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook
R$306.99
Microsoft SharePoint 2010 Power User Cookbook
R$272.99
Total R$ 852.97 Stars icon

Table of Contents

7 Chapters
Lists and Event Receivers Chevron down icon Chevron up icon
Workflows Chevron down icon Chevron up icon
Advanced Workflows Chevron down icon Chevron up icon
List Definitions and Content Types Chevron down icon Chevron up icon
Web Parts Chevron down icon Chevron up icon
Web Services and REST Chevron down icon Chevron up icon
Working with Client Object Model Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(4 Ratings)
5 star 50%
4 star 25%
3 star 0%
2 star 25%
1 star 0%
Sk Jun 21, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I got tired of books talking about what SharePoint can do and how good SharePoint is.They all seem to be looking at 30,000 feet level with lot of SharePoint buzz words.This books takes you straight to how to dot it with clearly identified tasks/solutions followedby explanations of each solution.After few useless books, finally I hit the right one, that will accelerate my learning
Amazon Verified review Amazon
Joel Plaut Dec 26, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Cookbook is a good term for this book. It is an excellent overview of SharePoint programming, with a task focus on the core programming tasks and deliverables a typical programmer is faced with. This means it's a handy shelf reference when faced with an assignment.I particularly enjoyed the common approach of "How it works" and "There's more" to continue exploration. This is a well structured and approachable programming reference book I would recommend.Joel Plaut[...]#spfanatic
Amazon Verified review Amazon
Amazon Customer Dec 02, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I purchased this book because I needed a good reference explaining business connectivity services, and also one that contained some code snippets demonstrating how to connect project code to the business data connectivity model. This book met that need.
Amazon Verified review Amazon
William van Strien Dec 28, 2011
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Both the book title (expert cookbook) as the table of contents (e.g. advanced workflow) sound good and promising. However the book content does not deliver on this. It certainly is no book for the SharePoint expert; there it tries to explain basic concepts as the structure of content types and site columns, webparts, features and SharePoint solutions. All this is and should be known stuff for the medium till experienced SharePoint developer.But it is neither applicable for novice SharePoint developers because it directly dives deep into the treated SharePoint subjects.Also you do not effectively learn how to apply Visual Studio for SharePoint 2010 development and deployment.The recipe format is a nice gimmick, but it soon starts to annoy since there is a lot of duplication per recipe: steps + figures. Effectively you have less content for your money.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela