surfacing your external data using bcs in sharepoint 2013 - dev connections 2013
DESCRIPTION
Slides from my talk on BCS and Search at Dev Connections 2013TRANSCRIPT
Fabian WilliamsSharePoint Architect
Planet Technologies, Inc.@fabianwilliams
Corey RothPrincipal Architect
Infusion@coreyroth
Surfacing your External Data using BCS in
SharePoint 2013
www.devconnections.com
SESSION TITLE
COREY ROTH
Transplant to Houston, TX Principal Architect at Infusion
Development SP2 Apps for SharePoint 2013 Four-timeMicrosoft SharePoint MVP Specializing in ECM, Search, and apps
2
www.devconnections.com
SESSION TITLE
3
WHERE IS FABIAN?
www.devconnections.com
SESSION TITLE
4
FABIAN HAS CHICKEN POX!
www.devconnections.com
SESSION TITLE
FABIAN WILLIAMS
• SharePoint Architect at Planet Technologiesin the Federal IW Practice
• SharePoint Community Activist• International Speaker
• SharePoint Saturday Speaker
• MS SharePoint Conference Speaker
• Avid/Incessant Blogger/Tweeter/Social Media Menace• @fabianwilliams
• http://www.sharepointfabian.com/blog
• Send him a tweet wishing him to get well soon!
5
www.devconnections.com
SESSION TITLE
6
SOME CHANGES…
No Fabian = no alerts Talk will focus more on BCS and search
aspects now Feel free to leave…no hard feelings
www.devconnections.com
SESSION TITLE
AGENDA
BCS Overview Configuring Search with BCS Customizing Search for BCS Search App
7
www.devconnections.com
SESSION TITLE
8
WHY DO I CARE?
Line of Business integration is a great often unused SharePoint feature
Use SharePoint to search custom applications instead of writing your own
Allows global enterprise-wide search across SharePoint and applications
www.devconnections.com
SESSION TITLE
9
BUSINESS CONNECTIVITY SERVICES (BCS)
www.devconnections.com
SESSION TITLE
10
BCS OVERVIEW
www.devconnections.com
SESSION TITLE
11
SUMMARY OF WHAT’S IN BCS
www.devconnections.com
SESSION TITLE
12
LIMITATIONS AFFECTING BCS
www.devconnections.com
SESSION TITLE
13
EXTERNAL CONTENT TYPES
www.devconnections.com
SESSION TITLE
14
SECURE STORE
www.devconnections.com
SESSION TITLE
15
BCS WITH SEARCH
Create models with SPD or Visual Studio
Be sure to configure a profile page site in BCS
Be sure and set Title column
www.devconnections.com
SESSION TITLE
16
DEMOBCS Configuration
www.devconnections.com
SESSION TITLE
17
SEARCH
www.devconnections.com
SESSION TITLE
18
CONFIGURING SEARCH WITH BCS
Content Source – used to index BCS source
Full crawl required every time schema is changed
No security trimming by default Default content access account needs
permissions to: Database (read only)
BCS (Execute / Select in Clients)
www.devconnections.com
SESSION TITLE
19
SEARCH SCHEMA
Defines what search can crawl, query, and refine on
Crawled properties – discovered during crawl Managed properties – usable by search 2013 - Defined at tenant, site collection, and
site level More granular and configurable in 2013
www.devconnections.com
SESSION TITLE
20
SEARCH SCHEMA WITH BCS
Table columns mapped to crawled properties Map crawled properties to managed
properties to: Display values in search results
Query against values
Configure refinement
www.devconnections.com
SESSION TITLE
21
MANAGED PROPERTIES - ATTRIBUTES
Searchable – included in full-text index Queryable – can be queried specifically Retrievable – can be displayed in search
results Refinable – used in refinement panel Sortable – built-in now! Safe – displayed for anonymous users Complete Matching – requires exact match
www.devconnections.com
SESSION TITLE
22
DEMOSearch configuration with BCS
www.devconnections.com
SESSION TITLE
23
DISPLAY TEMPLATES
Customize how individual search results look Allows BCS table columns to be shown in
search results Use managed properties marked with
Retrievable Managed as HTML snippets in Design Manager
www.devconnections.com
SESSION TITLE
24
DISPLAY TEMPLATES
www.devconnections.com
SESSION TITLE
25
DEMOSearching external content in SharePoint
www.devconnections.com
SESSION TITLE
26
BUILDING A SEARCH APP
www.devconnections.com
SESSION TITLE
27
QUERYING SEARCH
New Search REST API added Available at /_api/search/query
Use querytext parameter to query
Enclose query in single quotes
Example http://server/_api/search/query?querytext=’SharePoint’
Test directly in the browser
www.devconnections.com
SESSION TITLE
28
REST + JAVASCRIPT
Assemble REST API URL Include path to REST API
Use KQL in querytext parameter
Use $.ajax() to execute query Include Headers: { “Accept”: “application/json;
odata=verbose” }
Retrieve search results from: data.d.query.PrimaryQueryResult.RelevantResults.Table.
Rows.results
www.devconnections.com
SESSION TITLE
29
REST + JAVASCRIPT CODE
www.devconnections.com
SESSION TITLE
30
SEARCH APP
Use JavaScript and REST API to search our BCS source
Result source used to pre-filter results for BCS
www.devconnections.com
SESSION TITLE
31
DEMOBuilding an app to search external data
www.devconnections.com
SESSION TITLE
RECAP
BCS Overview Configuring Search with BCS Customizing Search for BCS Search App
32
www.devconnections.com
SESSION TITLE
33
RESOURCES
Search with REST and JavaScript
http://bit.ly/16LmtDj
BCS and Subscriptions
http://bit.ly/14ysPHe
www.devconnections.com
SESSION TITLE
34
QUESTIONS?