Central and Eastern Europe Dynamics CRM 2011 with Azure and SharePoint a perfect match Almut Tadsen Dynamics ISV Developer Evangelist atadsen@microsoft.com
Agenda for today Azure Execute your out of CRM code Azure AppFabric to connect to 3rd party sytems SharePoint Document Integration Business Connectivity Services (BCS) to surface data in SP
CRM and Azure
Azure Compute Web Worker SQL Azure Azure Compute - Managed and un-managed code running in cloud SQL Azure - Database in the cloud
Azure Hosted IFrames Windows Azure ideal host for IFrames Provides all cloud option with CRM Online Windows Azure can listen on Service Bus to receive data Windows Azure can call CRM Web Services
Pricing Compute - $0.12 / CPU hour (or part thereof) ~ 1.7 GHz, 2GB Ram, Single Core - $2.88 / Day - $86.4 / 30 days (billing period) - 2 instances = $172.80 / month Storage - $0.15 / GB/Month Bandwidth - $0.10 /GB inbound - $0.15 /GB outbound
Service Bus Access Control Access Control Identity federation through the cloud Service Bus Cloud hosted messaging bus for network topology agnostic messaging
Design Overview: Outbound from CRM Scenario: Customer will use the Service Bus to call 3rd party endpoints from CRM Online.
CRM + AppFabric Native support for routing plugin context via service bus Easy to write listeners Run on premise Run in the cloud Complexities lie primarily in setup
CRM to AppFabric Dispatch Runtime Events handed to Async service which maintains a durable queue Events posted Asynchronously to AppFabric Auto retry on failure
Demo setup TwoWayListener from CRM 20011 SDK needs Dynamics CRM 2011 SDK WindowsAzureAppFabric SDK
Setup Steps 1 2 Create an AppFabric project in Azure portal Write an event listener -> TwoWayListener from CRM 2011 SDK (implementing : IServiceEndpointPlugin) 3 Host TwoWayListener in Azure + locally 5 Create Service EndPoint Configuration with Plugin tool 6 Configure Access Control Service with Plugin tool 7 Register step
Pricing $1.99 / 100k Access Control Service transactions Connections - $3.99/connection/month - Bulk purchase available ~$2/connection Bandwidth - $0.10 /GB inbound - $0.15 /GB outbound Each end of the connection is counted. e.g. The simple CRM plugin scenario is two connections
CRM and Sharepoint
SharePoint and CRM are Complementary Combined strengths cover broad business needs SharePoint Unstructured & Semistructured Data Social Engagement & Collaboration Information Evolution & Storage Informal Rules Enterprise Search Across Teams & Domains Structured Relational Data Interactions, Activities & Tasks Information Generation & Analytics Formalized Processes Data Query & Filter Within Teams & Domains CRM
CRM Documents stored in SharePoint CRM Online (demo) or on premise Works with SharePoint On-Premise (demo) and Online (Office 365) List component for SharePoint Automatic SharePoint folder creation CRM look and feel for SharePoint documents Packaged as a SharePoint user solution Works ONLY with SharePoint 2010 Uses the SharePoint SDK Sandboxed Solution (= works Online)
Automatic creation Requires SharePoint 2010 with List component installed List Component creates folders (and Document Libraries) automatically Positioned under the default site Admin defines the location End users don t have to worry where documents are stored
Detailed flow of Document Integration Action=createfolder Action handler 3 4 Create folder on SharePoint CreateFolder.aspx Create Location Action 2 CRM Server 1 CrmGridPage.aspx Fetch folder contents SharePoint Server Create Location Record in CRM 7 Poll for URL change 6 8 CRMProxyPage 5 Set src of CrmProxyPage to result of folder create operation Client Browser
Setup Steps 1 Download the SharePoint List component 2 Install it inside SharePoint 3 Define the storage site in SP 4 Enable HTC in Sharepoint 5 Define participating entities in CRM 6 Set SP URL in CRM
SharePoint Business Connectivity Service The Business Connectivity Services (BCS) enables Create, Read, Update and Delete (CRUD) operations on an external data source (if allowed there) Data sources Databases Web/WCF services Microsoft.NET Framework connectivity assemblies Custom data sources Fully integrated into SharePoint including offline capabilities Data are shown i.e. as editable lists in SP For the moment only available in SP on premise
Business Connectivity Services (BCS) CRM Adapter Tool to automatically generate BCS model for a CRM model Through Web Services (no direct database access) CRM Online User BCS WCF
The CRM BCS Connector Problem: runtime version differences between SharePoint 2010 (v3.5) and CRM 2011 (v4.0). Solution:
The CRM Proxy Service Intermediary between CRM 2011 (.NET 4.0) and SharePoint 2010 (.NET 3.5) Simple WCF Service interface Data coming from CRM data types converted into primitive.net types which SharePoint can consume Data being sent back to CRM automatically converted into CRM data types CRMEntityService CRMEntityService.Web (endpoint for the service)
The SharePoint BCS Connector Custom.NET Assembly responsible for mapping external data into a form usable by SharePoint. hosted within SharePoint 2010 communicates with CRM via the CRM Proxy Service. SharePoint calls this connector using a specially crafted BDC Model (BDCM) an XML file stored by SharePoint which describes the operations SharePoint can perform on external data (e.g. CRUD) and the columns it needs to manage and show. The BDCM also describes relationships between external elements. CRMEntityService.SharePoint.Connector
The BDCM Generator tool command-line tool used to generate a BDCM file accepts a model definition XML file and authentication details as input, and provides a complete working BDCM file as output defines which of CRUD will be allowed CRMEntityService.SharePoint.CRMBCSUtil
Authentication Input credentials to access CRM only once (user/pw) Stored securely by SharePoint using the Secure Store Service Only data the user is allowed to see are shown No other user or administrator will be able to retrieve them or use them Choice of individual or group account
Setup Steps Deployment of the CRM Proxy Service 1 Generation of a CRMDeviceID and -password 2 Creation of a BDC Model file 3 Set up of the Secure Store Service in SP 4 Copy the BCS Connector into the GAC 5 Installation of the BDC Model 6 Creation of an External List to consume the CRM Data from SP 7
CRM BCS Connector package Will be made publicly available in June Comes with full source code -> can be modified If urgent -> contact me for a preview version (fully functional but documentation to be finalized)
Q & A
More Information CRM 2011 Online partner 12 month demo account Developer Training kit http://crm.dynamics.com/crmonlinepartnerdemo http://www.microsoft.com/downloads/en/details.aspx?familyid=78498c29-28ac-440b-9c20- ec5da6ee6e98 CRM 2011 SDK http://www.microsoft.com/downloads/en/details.aspx?familyid=420f0f05-c226-4194-b7e1- f23ceaa83b69 CRM Developer Portal Channel9 videos SharePoint BCS http://crm.dynamics.com/developer http://channel9.msdn.com/blogs/girishr http://msdn.microsoft.com/en-us/library/ee557658.aspx DeviceID generation tool http://crm.davidyack.com/journal/2010/9/16/generating-a-device-id-for-use-withcrmsvcutil.html Azure http://windows.azure.com