Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
1. Surfacing your External Data
using BCS in SharePoint 2013
Fabian Williams
SharePoint Architect
Planet Technologies, Inc.
@fabianwilliams
Corey Roth
Principal Architect
Infusion
@coreyroth
2. SESSION TITLE
COREY ROTH
Transplant
to Houston, TX
Principal
Architect at Infusion
Development
SP2
Apps for SharePoint 2013
Four-timeMicrosoft
Specializing
www.devconnections.com
SharePoint MVP
in ECM, Search, and apps
2
5. SESSION TITLE
FABIAN WILLIAMS
•
SharePoint Architect at Planet Technologies
in the Federal IW Practice
•
SharePoint Community Activist
•
•
SharePoint Saturday Speaker
•
•
International 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!
www.devconnections.com
5
6. SESSION TITLE
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
6
8. SESSION TITLE
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
8
15. SESSION TITLE
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
15
18. SESSION TITLE
CONFIGURING SEARCH WITH BCS
Content
source
Source – used to index BCS
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
18
19. SESSION TITLE
SEARCH SCHEMA
Defines
what search can crawl, query, and
refine on
Crawled
properties – discovered during crawl
Managed
2013
level
properties – usable by search
- Defined at tenant, site collection, and site
More
granular and configurable in 2013
www.devconnections.com
19
20. SESSION TITLE
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
20
21. SESSION TITLE
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
21
23. SESSION TITLE
DISPLAY TEMPLATES
Customize
Allows
results
how individual search results look
BCS table columns to be shown in search
Use
managed properties marked with
Retrievable
Managed
www.devconnections.com
as HTML snippets in Design Manager
23
27. SESSION TITLE
QUERYING SEARCH
New
Search REST API added
Available
at /_api/search/query
Use querytext parameter to query
Enclose query in single quotes
Example
Test
http://server/_api/search/query?querytext=’SharePoint’
directly in the browser
www.devconnections.com
27
28. SESSION TITLE
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.Ro
ws.results
www.devconnections.com
28
30. SESSION TITLE
SEARCH APP
Use
JavaScript and REST API to search
our BCS source
Result
BCS
source used to pre-filter results for
www.devconnections.com
30
33. SESSION TITLE
RESOURCES
Search with REST and JavaScript
http://bit.ly/16LmtDj
BCS and Subscriptions
http://bit.ly/14ysPHe
www.devconnections.com
33