New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.
-
Upload
ophelia-newman -
Category
Documents
-
view
216 -
download
0
Transcript of New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.
![Page 1: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/1.jpg)
Designing Lists & Schemas
![Page 2: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/2.jpg)
Outline
New & Improved EventsList Relationships and JoinsLarge List SupportField & List Item Validation
![Page 3: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/3.jpg)
New & Improved Events
![Page 4: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/4.jpg)
New & Improved Events
New events in MSF 4.0WebAdding & WebProvisionedListAdding & ListAddedListDeleting & ListDeleted
New Registration CapabilitiesSite collection level event registration to support new eventsSPSite & SPWeb event receiver registration via Features: new issue with SPSite or SPSite.RootWeb in registration
<Receivers ListTemplateId=“” Scope=“” />
![Page 5: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/5.jpg)
Post Synchronous Events
WSS 3.0 “after” events are exclusively asynchronousProblem when wanting to do post processing after item submitted, but before displaying to userMSF 4.0 adds new property on receiver definition to change “after” event to synchronous
SPEventReceiverDefinition.Synchronization
![Page 6: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/6.jpg)
Cancelling Events & Custom Error Pages
WSS 3.0 provided capability to cancel synchronous events & returning an error messageMSF 4.0 introduces capability to cancel error and redirect user to custom error pageNot possible on post synchronous eventsSynchronous cancel with error URLOnly work within the SharePoint browser user interface
Won’t work with Office clients (any version)
![Page 7: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/7.jpg)
Event Impersonation Improvements
WSS 3.0 events run in context of user who triggered the eventCertain things trigger events to run under System Account (workflow, etc), but doesn’t permit reverting back to user who triggered actionMSF 4.0 now adds the originating user & user token on SPEventPropertiesBase
![Page 8: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/8.jpg)
Events in Visual Studio 2010 Tools
![Page 9: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/9.jpg)
New & Improved Events
demo
![Page 10: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/10.jpg)
List Relationships & Joins
![Page 11: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/11.jpg)
Relational Lists & Joins
MSF 4.0 introduces the capability to have a relationship behavior enforced by a Lookup fieldNew investments:
Projected fields into child listsJoinsRelational integrity between parent & child lists
Introduces new security considerations and possible issues
![Page 12: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/12.jpg)
Relational Lists: Projected Fields
Projected FieldsExtra field pulled from parent list into view of child listVia browser interface, users add a lookup from another list just like WSS 3.0…Then, user can select a secondary lookup field to pull into the child list
![Page 13: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/13.jpg)
Relational Lists: Projected Fields
![Page 14: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/14.jpg)
Relational Lists: Joins
With relational lists, MSF 4.0 adds support for joinsJoins can only be implemented by developers using the API, CAML or SharePoint Designer 2010New properties on SPQuery:
SPQuery.JoinSPQuery.ProjectedFields
Use SPLinq instead of CAML to join two lists in code
![Page 15: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/15.jpg)
demo
Relational Lists & Joins
![Page 16: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/16.jpg)
Large List Support
![Page 17: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/17.jpg)
Large List Support
MSF 4.0 lists can now support 50M itemsUnder read scenarios
Platform Investments:Configuration options for administrators per Web application (Central Administration)Site collection & list administrators can request privileged operations (expensive queries)
Default Query Restrictions
![Page 18: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/18.jpg)
Managing Large Lists
Web Application Settings:List query size threshold (w/ warning threshold)Allow object model override
Enables developers to ignore query safety checks and run an unsafe query via SPQuery or SPSiteDataQuery
Requires special priv. 2 different limits:Normal user – 5,000 itemsSuper user – 20,000 items
Configure time window for expensive queries
![Page 19: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/19.jpg)
Managing Large Lists (2)
SPList:Kicks in when list count meets certain threshold List administrators will see warnings & messages when lists exceed thresholds
![Page 20: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/20.jpg)
Querying Large Lists
If throttling is enabled & list limit exceeded threshold, users won’t be able to query lists by default via APICan override querying the large list settings provided Web App configured to allow itOverride using:
SPQuery.RequestThrottleOverrideSPSiteDataQuery.RequestThrottleOverride
Only users with proper permissions get override ability (set via policies)
![Page 21: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/21.jpg)
Wide List Throttling
Support for number of fields that makeup a SPListItem
MSF 4.0 – SPListItems are limited to 6 rows
SPListItem limited to 8KB of data
Maximum number view fields selected for a joined of joins on a list view = six
Exception thrown if user tries to select fields from more than six fields from the joined listsIf no view fields specified (maximal view), only the first six pulled
![Page 22: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/22.jpg)
Unique Column Constraints
Lists can now contain columns that require all values in all items in the list for that column to be unique
Scoped at SPList, not SPFolder, level
Unique columns must be indexed (automatically configured)When making existing column unique, existing data is validatedUniqueness determined by SQL collation
Ex: Case sensitive / insensitive
![Page 23: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/23.jpg)
Working with Large Lists & Unique Columns
demo
![Page 24: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/24.jpg)
Field & List Item Validation
![Page 25: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/25.jpg)
List Item Validation
Items are validated against a custom formula when saved
![Page 26: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/26.jpg)
List Item Field Validation
Similar to list item validation, each column can be validated using a custom field, or by referencing other fields
![Page 27: New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.](https://reader036.fdocuments.in/reader036/viewer/2022062517/56649efe5503460f94c13ab8/html5/thumbnails/27.jpg)
Summary
Improved Support for EventsList Relationships and JoinsLarge List SupportField & List Item Validation