60
SharePoint 2010 By: Usman Zafar Malik [MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP Session - 4

SharePoint 2010 Training Session 4

Embed Size (px)

Citation preview

Page 1: SharePoint 2010 Training Session 4

SharePoint 2010

By: Usman Zafar Malik

[MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP

Session - 4

Page 2: SharePoint 2010 Training Session 4

SharePoint 2010 Development

Page 3: SharePoint 2010 Training Session 4

SharePoint 2010 Development• Content Types• Site Columns• List and Libraries• List Definitions• Event Receiver on Features• Event Receiver on Lists• List Instances• Page Layouts

Page 4: SharePoint 2010 Training Session 4

SharePoint 2010 Site Columns

Page 5: SharePoint 2010 Training Session 4

Site ColumnsWhat are site columns?• A column represents an attribute, or piece of metadata,

that the user wants to manage for the items in the list or content type to which they added the column.

Possible scopes• When you create a site column on a site, that site column

also becomes available to any child sites, and thereby, the lists on those sites.

Page 6: SharePoint 2010 Training Session 4

Site Columns

<Field ID="{9A77BCEB-5230-48f2-93ED-D87DAAEC6998}" Name=“SC1" StaticName=“SC1" SourceID="http://schemas.microsoft.com/sharepoint/v4" Group=“Group Site Columns" DisplayName=“SC 1" Type="Text" Required="FALSE" Sealed="FALSE"> </Field>

Page 7: SharePoint 2010 Training Session 4

Site Columns

Type Description Type FormatsText Single line of text

Note Multi line of text Plain TextRichText=”FALSE” (default value)

Rich TextRichText=”TRUE”RichTextMode=”Compatible” (default value)

Support simple html, bold, italics, bulleted or numbered lists, colored text, and background colors

Enhanced TextRichText=”TRUE”RichTextMode=”FullHtml”

Supports additional options for hyperlinks, pictures, and tables

Page 8: SharePoint 2010 Training Session 4

Site Columns

Type Description Type FormatsChoice Single Choice Drop-Down Menu or Combo Box

Format=”Dropdowns”

Radio Buttons or Check BoxesFormat=”RadioButtons”

MultiChoice Select Multi Choice

Integer Integer value Minimum Value (0 for example)Min=”0″

Maximum Value (100 for example)Max=”100″

Decimal Places (Default is Automatic, example 2 decimal places)Decimals=”2″

Show as Percentage (Default is False)Percentage=”FALSE”

Page 9: SharePoint 2010 Training Session 4

Site Columns

Type Description Type FormatsCurrency Currency value Minimum Value (0 for example)

Min=”0″

Maximum Value (100 for example)Max=”100″

Decimal Places (Default is Automatic, example 2 decimal places)Decimals=”2″

Currency FormatThis sets the display format of the currency.LCID=”3081″

Boolean Yes/No value Yes/True = 1 No/False = 0

Lookup Lookup column from some other list

Page 10: SharePoint 2010 Training Session 4

Site Columns

Type Description Type FormatsDateTime Date Time value Date and Time Format

Show the date only:-Format=”DateOnly”

Show the date and time:-Format=”DateTime”

User Select Single Person or Group People OnlyUserSelectionMode=”PeopleOnly”

People and GroupsUserSelectionMode=”PeopleAndGroups”

Show fieldShowField=”Name”

MultiUser Select Multiple Persons or Groups

URL Hyperlink or Picture HyperlinkFormat=”Hyperlink”

PictureFormat=”Image”

Page 11: SharePoint 2010 Training Session 4

Site Columns

Page 12: SharePoint 2010 Training Session 4

Site Columns

Page 13: SharePoint 2010 Training Session 4

Site Columns

Page 14: SharePoint 2010 Training Session 4

Site Columns

Page 15: SharePoint 2010 Training Session 4

Site Columns

Page 16: SharePoint 2010 Training Session 4

Site Columns

Page 17: SharePoint 2010 Training Session 4

SharePoint 2010 Content Types

Page 18: SharePoint 2010 Training Session 4

Content TypesWhat is content type?

• A content type is simply a way to define a particular set of information.

Possible scopes– Farm: No– Web Application: No– Site Collection: Yes– Web Site: Yes

Page 19: SharePoint 2010 Training Session 4

Built in Content Types

Page 20: SharePoint 2010 Training Session 4

Content Types• Two valid ways to construct a content type ID

• Parent content type ID + two hexadecimal values (the two hexadecimal values cannot be "00")

• Parent content type ID + "00" + hexadecimal GUID

Page 21: SharePoint 2010 Training Session 4

Content Types

Page 22: SharePoint 2010 Training Session 4

Content Types<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Parent ContentType: Item (0x01) --> <ContentType ID="0x010058be2d7367e54e128230e227d79d6112" Name="DummySharePointProject - DummyContentType1" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0"> <FieldRefs>

<FieldRef ID="{9A77BCEB-5230-48f2-93ED-D87DAAEC6998}" Name="SC1" /> <FieldRef ID="{6AAD913B-D930-49b5-8BCD-99FAB8857257}" Name="ExpiresOn" /> <FieldRef ID="{D38E97DA-CD82-4a77-9086-3B97A6D61A92}" Name="Activated" />

</FieldRefs> </ContentType></Elements>

Page 23: SharePoint 2010 Training Session 4

Content Types

Page 24: SharePoint 2010 Training Session 4

Content Types

Page 25: SharePoint 2010 Training Session 4

Content Types

Page 26: SharePoint 2010 Training Session 4

Content Types

Page 27: SharePoint 2010 Training Session 4

Content Types

Page 28: SharePoint 2010 Training Session 4

Content Types

Page 29: SharePoint 2010 Training Session 4

Content Types

Page 30: SharePoint 2010 Training Session 4

Content Types

Page 31: SharePoint 2010 Training Session 4

SharePoint 2010 List Definitions

Page 32: SharePoint 2010 Training Session 4

List Definitions

What is List Definition?

• List Definition as a Blueprint or template of a list using which you can create instances of list

Page 33: SharePoint 2010 Training Session 4

List Definitions

Page 34: SharePoint 2010 Training Session 4

List Definitions

Page 35: SharePoint 2010 Training Session 4

List Definitions

Page 36: SharePoint 2010 Training Session 4

SharePoint 2010 List Instance

Page 37: SharePoint 2010 Training Session 4

List Instance What is List Instance?

• An instance or object of List created from the List Definition.

Possible scopes– Farm: No– Web Application: No– Site Collection: Yes– Web Site: Yes

Page 38: SharePoint 2010 Training Session 4

List Instance

Page 39: SharePoint 2010 Training Session 4

List Instance

Page 40: SharePoint 2010 Training Session 4

List Instance

Page 41: SharePoint 2010 Training Session 4

SharePoint 2010 Event Receiver on Features

Page 42: SharePoint 2010 Training Session 4

Event Receivers What are Event Receivers?

• In Simple words, Event Handlers. Perform an operation when an event occurred.

Page 43: SharePoint 2010 Training Session 4

Event ReceiversTypes of Event Receivers

List Events

- Adding/ed a new list field.- Updating/ed a field.

List Item Events

- Adding/ed a new list item or document.- Document checking/ed in or out.- Adding/ed an attachment.- Deleting/ed an item or document.

Page 44: SharePoint 2010 Training Session 4

Event ReceiversTypes of Event Receivers

List Email Events

- A list received an email.

Web Events

- Deleting/ed a site collection or site.- Creating/ed a new site collection or sub site.

Feature Events

- Feature activating/ed or deactivating/ed.

List Workflow Events

- A workflow is starting/ed, postponed, or completed

Page 45: SharePoint 2010 Training Session 4

Event Receiver on Feature

Page 46: SharePoint 2010 Training Session 4

Event Receiver on Feature

Page 47: SharePoint 2010 Training Session 4

SharePoint 2010 Event Receiver on Lists

Page 48: SharePoint 2010 Training Session 4

Event Receiver on List

Page 49: SharePoint 2010 Training Session 4

Event Receiver on List

Page 50: SharePoint 2010 Training Session 4

Event Receiver on List

Page 51: SharePoint 2010 Training Session 4

Event Receiver on List

Page 52: SharePoint 2010 Training Session 4

Adding List Event Receiver in List’s Feature

Page 53: SharePoint 2010 Training Session 4

Adding List Event Receiver in List’s Feature

Page 54: SharePoint 2010 Training Session 4

Adding List Event Receiver in List’s Feature

Page 55: SharePoint 2010 Training Session 4

SharePoint 2010 Page Layouts

Page 56: SharePoint 2010 Training Session 4

Page Layouts What is Page Layout?

• A template on which page is created.

Page 57: SharePoint 2010 Training Session 4

Page Layouts

Page 58: SharePoint 2010 Training Session 4

Page Layouts

Page 59: SharePoint 2010 Training Session 4

Page Layouts

Page 60: SharePoint 2010 Training Session 4

Thanks !