1 / 0

XRM in practice and advanced topics

XRM in practice and advanced topics. Martin Straumann Technologie Team Leader Noser Engineering AG. Noser Engineering AG.

fionan
Download Presentation

XRM in practice and advanced topics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XRM in practiceandadvancedtopics

    Martin Straumann Technologie Team Leader Noser Engineering AG
  2. Noser Engineering AG Noser engineering ag is a leading and long established provider of technical software and services.Our team, of more than 100 engineers across several locations within Switzerland, implements demanding software solutions and carries out software test and test-automation projects. ============================= noserengineeringag talackerstrasse 99 CH-8404 winterthur martinstraumann technologieteamleader Tel.:       +41 (0)52 234 56 11    - zentrale Tel.:       +41 (0)52 234 56 17    - direkt Mobil:   +41 (0)78 707 32 23 Mail:      martin.straumann@noser.com Infos:      http://www.noser.com =============================
  3. Agenda XRM Business-Example ServiceTime Extracted democase example Entity customization External crm data handling Custom object integration with silverlight & microsoft virtual earth Q&A
  4. XRM Business-Example ServiceTime is an integrated fleet- and service management solution for order entry, service disposition and tracking in an ERP system. GSM / UMTS Order disposition Current order status Automatic routing optimization Vehicle overview on a map Connected to any CRM / ERP system Navigation to the order All information over the order Direct print to customer Communication Dispo / Driver
  5. Mobile Client Mobile Business Integration Server Backend Solution Mobile Sales Mobile Service … Document Service Backend Connector Microsoft Dynamics CRM/NAV/AX orother Backend LOB Applications Deployment Service ServiceTime Logging Service Tracking Service CRM 4.0 SQL Server CE Merge Replication SQL Server Merge Replication SSIS CRM 3.0 Reference Database Staging Database Resource Database Microsoft SQL Server component Server Connector and Integration Objects Backend Business Solution ServiceTime in combinationwith Microsoft Dynamics Mobile Development Tools
  6. Forklift businesscase

    demo Martin Straumann Technologie Team Leader Noser Engineering AG
  7. Mobile Client Mobile Business Integration Server Backend Solution Mobile Sales Mobile Service … Document Service Backend Connector Microsoft Dynamics CRM 4.0 Deployment Service ServiceTime Logging Service Tracking Service SQL Server CE Merge Replication SQL Server Merge Replication SSIS Reference Database Staging Database Resource Database
  8. Extracted case example Showing the location of CRM resources on a virtual earth map Using defined vehicle resources from CRM Map integration in CRM with Silverlight Integration of GPS position from an external WCF service
  9. Architectureoverview Windows Server 2008 CRM IIS WCF GPS-Service SilverlightVirtual Earth SilverlightMapapplication CRMWebservice SQL Tracking Data CRM Virtual Earth
  10. What do weneed? CRM Custom vehicle entity Testuser account Custom site for the Silverlight application Silverlight Virtual Earth component and vehicle component CRM webservice WCF-Service of the GPS tracking GPS Tracking WCF-Service SQL database with the GPS data WCF-Service with it logic
  11. Overview of customization types
  12. Entityrelationships in CRM 3.0
  13. Entityrelationships in CRM 4.0
  14. Vehicle entity & useraccount

    demo Martin Straumann Technologie Team Leader Noser Engineering AG
  15. TIP 1: UsingtheMetadata Browser http://yourservername[:port]/yourorganizationname/sdk/list.aspx
  16. TIP 2: Utilities The Customization Comparison Utility lets you compare the customization files between two Microsoft Dynamics CRM systems The Configuration Data Utility lets you transfer custom configuration data from one Microsoft Dynamics CRM system to another.
  17. TIP 3: Sitemaperror There is a slight chance that an error in the Site Map could cause the Navigation Pane to not render correctly and it could become impossible to navigate to the Import Customizations area to fix the problem. In this event, you can access the Import Customizations area directly. http://<CRM_Servername>/<Organization_name>/tools/systemcustomization/ImportCustomizations/importCustomizations.aspx
  18. SilverlightMapApplication
  19. Application architecture Silverlight IIS CRM Page, XAML IVehicleData VehicleData BusinessLogic BusinessLogic Dataset GPS Data
  20. Usingthe CRM webservice
  21. Obtainorganizationinformation // STEP 1: Instantiate and configure the // CrmDiscoveryService Web service. discoveryService = newrmDiscoveryService(); discoveryService.UseDefaultCredentials = true; discoveryService.Url = "http://localhost/MSCRMServices/2007/AD/CrmDiscoveryService.asmx";
  22. Obtainorganizationinformation // STEP 2: Retrieve the organization name and // endpoint URL from the CrmDiscoveryService orgRequest =newRetrieveOrganizationsRequest(); orgResponse = (RetrieveOrganizationsResponse) discoveryService.Execute(orgRequest); OrganizationDetailorgInfo = null; foreach (OrganizationDetailorgDetail in orgResponse.OrganizationDetails) { if (orgDetail.OrganizationName.Equals(„Noser")) { orgInfo = orgDetail; break; } }
  23. Obtainorganizationinformation // STEP 3: Create and configure an instance of // the CrmService Web service. token = newCrmAuthenticationToken(); token.AuthenticationType = 0; // See Microsoft.Crm.Sdk.AuthenticationTypetoken.OrganizationName = orgInfo.OrganizationName; crmService = newCrmService(); crmService.Url = orgInfo.CrmServiceUrl; crmService.CrmAuthenticationTokenValue = token; crmService.Credentials = System.Net.CredentialCache.DefaultCredentials;
  24. Obtainorganizationinformation // STEP 4: Invoke a CrmService Web service // method. whoRequest = new WhoAmIRequest(); whoResponse = (WhoAmIResponse) crmService.Execute(whoRequest);
  25. TIP 4: CRM Webservice Wrapper Create a wrapper that use the CRM webservice and dynamically provides basic functions over entities like: Create Delete Update
  26. TIP 5: Hanging CRM Webservice I cameacross a problem in Visual Studio 2008, wherebyitseemedto hang every time I added a web referencetothe CRM web service, andthentriedusing IntelliSense todiscovertheattributesof an entity. Itturns out that a bug in theway Visual Studio 2008 handles large XML files (such asthe CRM WSDL file) causesthisbehaviour, andsimplydisabling XML commentgenerationforeachprojectsolvestheproblem.
  27. The GPS WCF Service IVehicleData VehicleData BusinessLogic Dataset GPS Data
  28. Creatingthedatabase
  29. CRM Silverlight Applikation Vehicle IDNameTypeAge… Vehicle IDNameLongitudeLatitudeTimestamp Anzeigen DB Vehicle IDLatitudeLongitudeTimestamp Nodataset in silverlightwhatnow?
  30. The silverlightapplication
  31. Reading vehicledata // Generate the query cols = new ColumnSet(); cols.Attributes = new string[] { "new_name", "new_type" }; query = new QueryExpression(); query.EntityName = "new_vehicle"; query.ColumnSet = cols;
  32. Authentication 1/2 // This is the KEY part... we inject the CRM// Authentication header.The Xml formater is// just to prevent some characters from being// encoded (otherwise CRM can't parse the// authentication token properly) header = MessageHeader.CreateHeader ("CrmAuthenticationToken", "http://schemas.microsoft.com/crm/2007/WebServices", "", new MyCrmAuthenticationTokenSerializer(0, "NoserEngineeringAG", null));
  33. Authentication 2/2 // Insert SOAP header OperationContext.Current = new OperationContext((IContextChannel)client.InnerChannel); OperationContext.Current.OutgoingMessageHeaders.Add(header);  
  34. Serializationobject <AuthenticationType xmlns='http://schemas/crm/2007/CoreTypes'> 0 </AuthenticationType> <OrganizationName xmlns='http://schemas/crm/2007/CoreTypes'> NoserEngineeringAG </OrganizationName> <CallerIdxmlns='http://schemas/crm/2007/CoreTypes'> 00000000-0000-0000-0000-000000000000 </CallerId>
  35. With a “normal” project // Set up the CRM service. token = new CrmAuthenticationToken(); token.AuthenticationType = 0; token.OrganizationName = "NoserEngineeringAG"; service = new CrmService(); service.CrmAuthenticationTokenValue = token; service.Credentials = System.Net.CredentialCache.DefaultCredentials;
  36. TIP 6: Debugging Fiddlerfreetouse
  37. Silverlight and CRM 4.0

    demo Martin Straumann Technologie Team Leader Noser Engineering AG
  38. Summary Use the „power“ of the new entity relationtypes Try to use a CRM wrapper in bigger projects Silverlight can have additional workflows
  39. Want more programming tips? Drop your business card in the pot and get more tips via email.
  40. Questions
  41. ============================= noserengineeringag talackerstrasse 99 CH-8404 winterthur martinstraumann technologieteamleader Tel.:       +41 (0)52 234 56 11    - zentrale Tel.:       +41 (0)52 234 56 17    - direkt Mobil:   +41 (0)78 707 32 23 Mail:      martin.straumann@noser.com Infos:      http://www.noser.com =============================
More Related