Home

Rödl Microsoft Dynamics CRM® 2011

image

Contents

1. The schema Create is completely generic and independent from the several entities The name of the entity to be created has to be entered in the element LogicalName The individual attributes are filled through key value pairs e g the elements KeyValuePairOfstringstring key and KeyValuePairOfstringstring value Because of this generic approach the individual attributes of the several entities do not appear obviously In managed code such as Net assemblies this approach may be useful So let s take a look at what is happening when we are trying to map such a schema Debmas2Account btm X ee ira ee en a ns1 LogicalName F B ns1 RelatedEntities Organizatio Oo so Dei 7 9 5 DEBMASO6 GL Schema lt Schema gt E E Create DEBMASO6 de zi Cl entity EDI DC40 E E a ns1 Attributes E2KNA1MOOSGRP E E ns1 KeyValuePairOfstringanyType EIKNAIM E E amp y ns5key DATAHEADERREC E m E ns5 value MSGFN 2 5 ns1 EntityState KUNNR Es a ns1 FomattedValues ANRED fel E E ns1 KeyValuePairOfstringstring AUFSD Es eb ns key BAHNE Es amp y ns5 alue BAHNS fe B ns1 ld BBBNR amp BBSNR Es BEGRU E BRSCH E BUBKZ E DATLT Es FAKSD FISKN Es KONZS fe KTOKD E KUKLA E LAND1 Es LIFNR E LIFSD Es Locco Es LOEW Es NAME NAME2 amp NAME3 Gs NAME4 E NIELS fe ORTO1
2. Attention Take care of the contactid so the CRM system can find the desired record The message can also contain further attributes but the adapter will ignore them 3 Copy the file into the input folder of the receive port Contact Delete e g C FileDrop Contact Delete In 2013 R dl Consulting AG Seite 49 var MS CRM Adapter for Microsoft BizTalk 5 Seite 50 After a short while an XML file will appear in the output folder of the send port Contact Delete e g C FileDrop Contact Delete Out The content should look something like this lt xml version 1 0 encoding utf 8 gt contact xmlns http Roedl BizTalk Schemas MSCRM account lt addressl addressid 607A99B9 AC5A DB11 ACC2 0050DA4615A6 addressl addressid gt lt owningbusinessunit gt C4991D79 06EB DA11 A201 0050DA4615A6 lt owningbusinessunit gt lt donotsendmm name Yes gt 0 lt donotsendmm gt lt statecode name Active formattedvalue Active gt Active lt statecode gt lt statuscode name Active formattedvalue 1 gt 1 lt statuscode gt lt merged name No gt 0 lt merged gt lt createdby dsc 0 name creator gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt createdby gt lt firstname gt James lt firstname gt lt fullname gt James Kirk lt fullname gt lt createdon date 03 08 2011 time 1 19 PM gt 2007 03 08T13 19 44 02 00 lt createdon gt lt ownerid type systemuser dsc 0 name owner gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615
3. 02013 R dl Consulting AG Seite 29 P MS CRM Adapter for Microsoft BizTalk Step 2 Creating the send port Account 1 In the BizTalk Server Administration Console right click on Send Ports select New and click Static One way Send Port 2 Inthe field Name enter CreateAccount E CreateAccount Send Port Properties Transport Advanced Options Name Backup Transport m Outbound Maps Fort type Static One Way Filters Transport Certificate Select a transport type and transport address below Type FILE Configure URI C BizT alk FileDirapsCreate amp ecount Riespoange s M ess Send handler BizT alkServer amp pplication d Tracking Send pipeline xMLTransmit Micrazaft BizT alk DefaultPip m Description Is Cancel Apply 3 Select File in the field Transport Type 4 Click Corfigure FILE Transport Properties EN General Authentication Destination folder esponsew Browse File name MessagelD mi Copy mode Create New DI Allow cache on write Use temporary file while writing Cancel 5 Enter the folder C BizTalk FileDrop CreateAccount Response in the field Destination Folder In the other fields leave the default values 6 Click OK 7 Select XMLTransmit in the field Send Pipeline 8 Click wk Seite 30 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk ROI Gt Partsier Step 3 Creat
4. nsO addressl telephonel 449 123456 ns0 addressl teleph nel gt lt ns0O emailaddressl gt JTK Space com lt ns0 emailaddress1l gt lt nsO name gt James T Kirk lt nsO name gt amp ns0 accounmnt lt ns0 roedlUpsert gt lt ns0 roedlUpsert gt af dee hehe E et ee ton The condtition attribute inside the roediUpsert element allows to create a condition like a fetch to describe the key for finding the related object In this examble the adapter fetch in the accounts for an accountnumber with the value 123456 If the condition is not valid results more than one the adapter throw an error If the adapter finds exactly one entity the adapter will update this entity And if the adapter find no entity it will create a new entity If you fill the condition for an upsert in a BizTalk mapping it will look like this for example l lt Schema gt lt Schema gt CH 3 ERPAccount accountCustomAction E e DebitorNo account amp Nam amp lt Sequence gt el Country v ZipCode accountnumber amp e Street address city amp e HouseNo address composite fel 5 CRMID address 1_country amp amp ParentDebNo v address line amp QU addressi postalcode amp v name amp iw parentaccountid amp name 5 type A condition A a m QV roedlUpsert EI condition d DE Ha 12 C
5. BizTalk Upsert The Upsert method is a new feature to create AND update entity records Request Messagetype Response Messagetype accountCustomAction 6 Create an orchestration looking like this Port Surface Port Surface e rp_Customer x Operation_1 ES srp_XRM Request d e Receive_Custo Create F Request E e Response Send Account M Upsert VI Request BE a Response Receive_Account ES sp Account Respon Send Account Operation 1 Request EN 7 Create an XML message file to create a new record For example contact create xml ns0 accountCustomAction xmlns nsO0 http Roedl BizTalk Schemas MSCRM account lt ns0 account ns0 accountnumber 123456 ns0 accountnumber ns0 addressl coity Nuremberg ns0 addressl city 4 ns0 addressl country Germanye ns addressl country gt ns0teddr ssl linel Mainstreet 1 ns0 addsessl Tinel gt ns0 eddr ssl postalocods2 91000 ns sddressl postalcode gt ns0 addressl telephonel 449 123456 ns0 addressl telephonel gt ns0 emailaddressi1 JTK8Space com ns0 emailaddressli ns0 name James T Kirkc ns0 name e ns0racoount lt ns0 roedlUpsert gt lt ns0 roedlUpsert gt lt 7 ns0 saceoun Customacrion Attention Take care of the namespace It has to be the same as given in the schema 8 Copy the file into the input folder of the receive port Account Create e g C FileDrop Account Create In 9 After a short whi
6. es poe n Q Options DEBMASOS ale VS FISKN account KNRZA fe i Sequence KONZS 2 e Cl accountcategorycode KTOKD fe accountelassficationcode KUKLA E Bee LAND t5 accountnumber LIFNR fe Cl accountratingcode LIFSD Er e z address addressid Locco fe address addresstypecode LOEVM f r fgp address city NAME di tj address country NAME2 di 45 address county NAME3 amp j address fax NAMES amp e address freighttermscode NIELS 2 e 5 address1_lattude ORTO amp fg address inel ORTO2 Er iy address ke PFACH amp g address ke PSTL2 fe e E address longtude PSTLZ amp e address name REGIO E fg address postalcode COUNC fe fg address 1_postofficebox CITYC br cd address 1_pnmarycontactname RPMKR E address shippingmethodcode SORTL Er cd address stateomrovince SPERR Er lt 5 address telephone SPRAS f r 45 address telephone2 STCD1 br 5 address telephone3 STCD2 Es 43 address upszone STKZA fi e Cl address utcoffset STKZU Er address2 addressid STRAS far address2 addresstypecode TELEX kr cd address2 city TELFI Ee ZH S address2 country TELF2 f Because the data types of the attributes are determined at designtime no problems occur during serialization at runtime The R amp P MS CRM WCF Adapter for MS BizTalk will only create the schemas that you actually need You can easily add the schemas to your project in Visual Studio in the same way as you have
7. parentaccountid will not be filled and no exception happened 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner If you fill the condition for a lookup in a BizTalk mapping it will look like this for example iz Schema lt Schema gt CH E z E ERPAccount accountCustomAction f e DebitorNo account amp S Name lt Sequence gt l Country EU amp ZipCode accountnumber ds ech Cty Gei e Street address city amp b HouseNo address composite lt 3 CRMID address country d sb ParentDebNo v address line amp w address 1_postalcode amp 0 name amp parentaccountid amp name f type amp condition s D 0 pis 0 roedlUpset condition amp Attention Take care of the namespace It has to be the same as given in the schema 17 Copy the file into the input folder of the receive port Account Create e g C FileDrop Accountf Create in 18 After a short while an XML file will be appear in the output folder of the send port Account Create e g C FileDrop Account Create Out The content should look something like this ns0 account xmlns ns0O http Roedl BizTalk Schemas MSCRM account ns0 accountnumber 123456 ns0 accountnumber ns0 addressl city gt Nuremberg lt nsO addressl city ns0 addressl country Germany ns0 addressl country ns0 addressl linel Mainstreet
8. 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 5 Onthe URI Properties tab you have to provide system related information Please make sure that you type in the correct organization name This is not the prefix of your CRM Online url but you can find it in CRM Online when you go to Settings gt Customizations gt Developer Resources It s the unique name of the organization server Name should be crm4 dynamics com for Europe Secure Mode True Port doesn t matter in this case the Adapter will use 443 anyway Configure Adapter Security URI Properties Binding Properties El Connection Organization Port Secure Mode Server Name Organization crm4orgre307 5555 True crm A dynamics com Cancel On the tab Binding Properties you can choose some general timeout options and the target namespace In the section licensing you have to enter the license code and license name you have received upon your purchase Afterwards you can continue with Step 6 from Working with the adapter in Visual Studio 2010 Designtime and select your entities and messages 02013 R dl Consulting AG Seite 43 var MS CRM Adapter for Microsoft BizTalk Further examples In the following all the methods of the adapter will be presented once more individually in more detail using the Contact entity 1 First create a folder structure for processing the messages This may look
9. Connect the orchestration to the host 6 Click ox 7 Start the orchestration Console Root S El sei BizTalk Server Administration Orchestrations E 35 BizTalk Group WIN H3772QKHPM E Applications HH AI Artifacts gt e BizTalk System E BizTalk Application 1 E i MSCRM Adapter Test Lay Orchestrations LIrrenilist ij Role Links Remove i Send Port Groups Move To Application li Send Ports sj Receive Ports Tracking Receive Locations Ej Policies Schemas Ga Resources 8 The BizTalk Server is now ready to execute the orchestration Seite 40 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Step 6 Testing the Orchestration 1 Copy a XML file with the following structure into the folder C CreateAccount Request Attention Take care of the namespace It has to be the same as given in the schema of Account lt xml version 1 0 encoding utf 8 gt lt account xmlns http Roedl BizTalk Schemas MSCRM account gt lt name gt Roedl Consulting AG lt name gt lt addressl name Roedl Consulting AG addressl name addressl linel gt Laubanger lt address1_ linel gt lt addressl_ line2 23 address1 line2 gt lt addressl_ city gt Bamberg lt addressl city addressl country D addressl country lt addressl postalcode gt 96052 lt addressl postalcode lt account gt 2 The BizTalk Server reads the file and sends the data to the a
10. Query ns1 Attributes Create ns1 KeyValuePairOfstringanyType Ge amp LogicalName gt bers uu f value e amp websteurl ns1 EntityState d seh telephone 1 ns1 FormattedValues das eh accountnumber ns1 ld fe 3 When we trying to map the values directly we will get a serialization exception at runtime because the data type of the values is xsd anytype and it is impossible to map values of this data type directly to an attribute 5o we have to use a script functoid to convert the values to the appropriated data types Create ns1 KeyValuePair fstinganyType amp eb LogicalName key amp e name value amp gt websiteuri ns 1 EntityStat eb telephone 1 ns 1 Formatted Value e accountnumber ns1 h ns1 LogicalNam ns 1 RelatedEntitie 4 The script code looks like this lt xsl template name SetNameValue gt lt xsl param name paraml gt lt value xmlns http schemas datacontract org 2004 07 System Collections Generic gt lt xsl attribute name xsi type gt lt xsl value of select xs string gt lt xsl attribute gt lt xsl value of select paraml gt lt value gt lt xsl template gt This procedure is highly inefficient Therefore the R amp P MS CRM WCF Adapter for MS BizTalk works just like the R amp P MS CRM WS Adapter for MS BizTalk Namely with typed schemas in which the attributes of the several entities are clearly defined and typed as well Anot
11. R dl amp Partner MS CRM Adapter for Microsoft BizTalk 3 Now choose the binding and click Configure Select a binding Configure a URI Search in category Available categories and operations Mode ID Added categories and operations Mode ID Filename Prefix 4 Here you can enter the configuration for the Microsoft Dynamics CRM 2011 system you want to connect with On the tab Security you have to enter the credentials which are used to authenticate against Microsoft Dynamics CRM 2011 URI Properties User name credentials Username Remove Seite 16 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 5 On the tab URI Properties you have to select the Authentication Type Choose Active Directory if you are going to connect to an on premise system which uses the active directory to authenticate users Choose Live ID if the target system is hosted in the Cloud and uses Windows Live ID for authentication Furthermore the organization the port transport security http or https and the server name have to be entered URI Properties Binding Properties 4 Connection Organization Demo Part 5555 Secure Mode Fal SE EECH URL Server 6 On the tab Binding Properties you can choose some general timeout options and the target namespace In the section licensing you have to enter the license code and licen
12. gt 2011 03 08T13 19 44 02 00 lt modifiedon gt lt mobilephone gt 01234 lt mobilephone gt modifiedby dsc 0 name modifier gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt modifiedby gt lt lastname gt Kirk lt lastname gt lt address2 addressid gt 617A99B9 AC5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt contact gt The CRM system has provided the record with all filled attributes and the data could now be processed in the orchestration 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Delete The Delete method is used for deleting an entity record based on the unique identifier Request Messagetype Response Messagetype Contact Contact 1 Create an orchestration looking like this Port Surface e Port Surface rpcontack Delete MSCRM Contact Operation 1 MEM S ES Create Request E Receive_l 3 Request 4 Response Bat u Delete ES Request e ge Response G e Receive 2 Fetch spContack Delete 3 Request Operation 1 d d Ka 48 Response Request M E Send 1 Retrieve e 3 Request 48 Response Update 3 Request 4 Response 2 Create an XML message file to delete a single record For example contact delete xml contact xmlns http Roedl BizTalk Schemas MSCRM contact lt contactid gt 733ef35b 1947 db11 acc2 0050da4615a6 lt contactid gt lt contact gt
13. 1 TT Be Create Request E Em Bu Request Pa Response ES H a Send 1 Delete 3 Request 48 Response D wi Receive Fetch b Request sp ccount a p Response Operation 1 NEM ES 2 Request Ei EO Retrieve 3 Request 48 Response Update 3 Request I Response 2 Create an XML message file to create a new record For example contact_create xml contact xmlns http Roedl BizTalk Schemas MSCRM contact lt firstname gt Jim lt firstname gt lt fullname gt Jim T lt fullname gt lt lastname gt Kirk lt lastname gt lt mobilephone gt 49 171 123456 lt mobilephone gt contact gt EN 3 Copy the file into the input folder of the receive port Contact Create e g C FileDrop Contact Create ln Attention Take care of the namespace It has to be the same as given in the schema 4 After a short while an XML file will be appear in the output folder of the send port Contact_Create e g C FileDrop Contact Create Out The content should look something like this lt xml version 1 0 encoding utf 8 7 gt contact xmlns http Roedl BizTalk Schemas MSCRM contact lt firstname gt Jim lt firstname gt lt fullname gt Jim T lt fullname gt lt lastname gt Kirk lt lastname gt lt mobilephone gt 01234 lt mobilephone gt lt contactid gt 733ef35b 1947 db11 acc2 0050da4615a6 lt contactid gt lt j contact gt 5 The CRM system has created the record and provides the contactid This can be proces
14. Account and AccountList will be created The collection schema will be needed for the Fetch response of the several entities Seite 20 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk Sample schema for an entity Account Ww entity account xsd X EN 2 2 account 3 R dl amp Partner lt xml version 1 0 encoding utf 16 gt lt xs schema xmins b hittp schemas microsoft com Biz Talk 2003 xmins ins http Roedl BizTalk Schemas MSCRM account elementFormDefault qualified target Namespace http RoedI BizTalk Schemas MSCRM account version 1 0 xminsxs http www w3 org 2001 XMLSchema gt lt xs annotation gt lt xs appinfo gt fileName Hint xmins http schemas microsoft com servicemodel adapters metadata xsd gt entity_account lt ile NameHint gt lt xs appinfo gt lt xs annotation gt lt xs complex Type name Entity abstract true gt lt xs complex Type name account gt xs complexContent mixed false gt lt xs extension base tns Entity gt lt xs sequence gt lt xs element minOccurs 0 name accountcategorycode type xs int gt lt xs element minOccurs 0 name accountclassificationcode type xs int gt lt xs element minOccurs 0 name accountid type tns guid gt lt xs element minOccurs 0 name accountnumber type xs string lt xs element minOccurs 0 name accountratingcode type xs int gt
15. Custom Send Port Properties c gt Di rer CS ei Transport Advanced Options i VG M ame DEE endPort_rm dapterBinding_Multiple_Lustorm C gt s Backup Transport mer E d Inbound Maps Part type Static Salicit Hespanse m Outbound Maps Transport Filters Select a transport type and transport address below Certificate Weg ge worcustem ie ORI smo peer 01 1 dev 5555 Roed 2 authz amp L enzel Send handler BizT alkServer pplication WCF Lustom Transport Properties 5 General Binding Behavior Credentials Messages Import Export User name credentials F Do not use Single Sign On User name domimusemaom D Password TTT 5 Enter the following XML string into the text field in the section SOAP Action Header lt BtsActionMapping xmlns xsi http www w3 org 2001 XMLSchema instance xmlns xsd http www w3 org 2001 XMLSchema gt lt Operation Name Create Action Create gt lt Operation Name Update Action Update gt lt Operation Name Retrieve Action Retrieve gt lt Operation Name Fetch Action Fetch gt lt Operation Name Delete Action Delete gt lt BtsActionMapping gt A Attention The Upsert statement is a new functionality for much faster development Seite 24 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk General Binding Behavior Endpoint Address Address URI xm crm4 dynamics com 443 demo ssl
16. Microsoft Crm Sdk Types accountleads E XRM Operations activitymimeattachm Microsoft Crm Sdk Types activitymimeattachment CRM Operations activityparty Microsoft Crm Sdk Types activityparty ET ato E Y mm nu at on a Added categories and operations Node ID Microsoft Crm Sdk l ypes account Filename Prefix ee TY 11 Click x to close the window and generate the chosen schemas The solution explorer may appear like this if you have selected the Fetch operation and the account entity Solution Explorer all a Solution Roedl MSCRM WCF Adapter Sample 1 project E Roedl MSCRM WCF Adapter Sample Hd Properties oj References amp deleteMe entity accountresponsexsd a Ger accountxsd CH Solution Explorer LGS 12 The files deleteMe_entity_xxxResponse xsd can be deleted 2013 R dl Consulting AG Seite 19 var MS CRM Adapter for Microsoft BizTalk 13 Use the generated file named WcfSendPort_Adaptername_Custom bindinginfo xml to easily create and configure a send port without entering the whole configuration in the BizTalk Administration Console again Attention A In the XSD file of an entity a schema for the entity itself and the appropriated entity collection will be generated The name of this collection is a combination of the entity name and the word List For example by generating the schemas for the entity Account a XSD file named entity_Account xsd containing the schemas
17. R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Configuring send ports for the adapter Runtime 1 When creating the schema in the designtime an XML file is created and added to your project Start the BizTalk Server Administration Console und navigate to your application e g MSCRM_Adapter_Sample 2 Right click on Send Ports select Import and click Bindings Console Root E ra BizTalk Server Administration CR MSCR M Adapte r Sample 35 BizTalk Group BT2010 BizTalkMgmtDb Ei Applications All Artifacts gt E ei BizTalk System DN Role Links ui BizTalk Application 1 F BizTalk EDI Application 27 Send Port Groups EBHmIMSCRM Adapter Sample al Sand Ports CA Orchestrations Stark er ls Role Links Stop un g gt Send Port Groups Configure ceive Locations 4 Send Ports MSI file E Receive Ports Export Bindings E Receive Locations Add Eal Policies Schemas Delete Ki Maps Refresh tj Pipelines Properties Da Resources Lei Parties Help Ga Platform Settings Event Viewer Local 3 A file selection window appears m Import Bindings x Projects Roedl MSCRM Adapter Raedl MSCRM Adapter X Organize e New folder A il E My Documents A Integration Services Script Component E Documents library Roedl MSCRM Adapter A Integration Services Script Task A SQL Server Management Studio Name Date modified Visual Stu
18. True Example xmm host port path Endpoint Identity Optional the expected service identity SOAP Action header Action lt BtsAction Mapping xmlns xsiz http www w3 org 2001 XMLSchema nal a Operation Mame Create Action Create gt Operation Name Update Action Update gt Operation Mame Retrieve Action Retrieve gt Single action example http www northwindtraders com Service Operation Action mapping example using BTS Operation property BtsActionMapping gt are Name peration 1 Acion Action 1 gt Operation Name OperationN Actionz ActionN gt BtsActionMapping Select binding type and click tree nodes to edit binding configuration Brdr Tyee Restore Defaults Binding 4 Key name 4 StandardBindingHlement close Timeout 00 01 00 open Timeout 00 01 00 receive Timeout 00 10 00 send Timeout 00 01 00 Connection Reuse True License Code 321654987654317 License Name Name Max Available Cor 50 Peer Culture Default Peer TimeZone Unspecified targetNamespace http Hoedl Biz Talk Sche Li Cod D n Meester LicenseCode Name License Code Default Value System 6 Enter the License Name you ve received upon your purchase 7 Enter the License Code you ve received upon your purchase 02013 R dl Consulting AG R dl amp Partner Seite 25 P MS CRM Adapter for Microsoft BizTalk 8 You should take the default value for Target Namespace becau
19. gt amp Microsoft BizTalk Server Dynam cs CRM Microsoft Dynamics CRM 2011 2015 WCF Adapter for Microsoft BizTalk Server 2010 2013R2 User manual Published on August 2015 2014 R dl Consulting AG All rights reserved Be MS CRM Adapter for Microsoft BizTalk Table of Contents Jeu dee Be 1 OT EE 3 Adapter moder opel allOfi ausstellen 3 Why an adapter when Microsoft Dynamics CRM provides a WCF interface 3 SECUN eM P rrr 7 Installation and configuration the Adapter mnes 7 ASTA EE AESA E E EN E a a ee ar 7 IN ler e EE nein 7 Installation LOB ae 7 Installation Windows Identity Foundation KB974405 u02440020000ennonenn nenn nenne nenne nennen 9 Installation BizTalk Adapter Hack 10 installation TOC Adapter m 12 Configuration of the Adapnter enne nnne ARR RR RR SRK KRK RAR RR RR RAR RR RR RR 13 WCF XRM Adapter Installation under 64 Du 14 BAC ONO UNG DEE 14 Manual Registration Instruction lessen nennen nnne nnn nnn ris 14 Paste to the 64 bit machine configuration mossmssesssresssrresrrresrrrrerrrrenrrrrrrrr nns rr rn rr rr nr rann rr rr nr RR ren n nn 14 Working with the R amp P MS CRM WCF Adapter for MS BizTalk tssnsnnnnsssrsrrrrsssssssrrrrrrensrrrrrrrnnnnrrn 15 Working with the adapter in Visual Studio Designtime nmlnnessmsssssssssrresersrrensrrrrrnnrrrrrnnnrrrrr
20. le ns0 addressl linel ns0 addressl postalcode 91000 ns0 addressl postalcode gt lt neVraddressl telephonel gt 49 125456 ns0 addresSs5l relephonel ns0 emailaddress1 JTKG8Space com c ns0 emailaddress1 ns0 name James T Kirk lt ns0O name gt lt nsO accountid gt c126574a 8ccd e311 93f3 00155dla5a6b lt ns0 accountid gt e ns0 account 19 The CRM system has created the record and provides the accountid This can be processed directly in the orchestration The parentaccountid is automatically included 02013 R dl Consulting AG Seite 57 var MS CRM Adapter for Microsoft BizTalk Import Account A small project that demonstrates the performance of the adapter before the upsert statement exist To be reasonable it will be assumed that the customer records from the external application are already available as individual XML files After receiving the Account message a Fetch message will be used to establish whether the Account in the CRM system already exists The primary key for finding the customer is the customer number In our case it is the accountnumber Therefore the Account message has to be mapped to a Fetch message The Fetch Request should look something like this ns0 fetch mapping logical xmlns http Roedl BizTalk Schemas MSCRM Fetch ns0 entity name account gt ns0 all attributes lt nsO filter type and gt lt ns0 condition attribute accountnumber operator eq
21. like this ic Filedrop E CO Contact E i Create c in CO aut E i Delete CO in E VC Fetch ie in ca aut 3 IC Retrieve in c aut E DO Update ic in c aut 2 n the BizTalk Server Administration Console create the appropriate receive and send ports as described earlier in this manual 3 Deploy the orchestrations described in the following and bind the logical ports to the physical ports in the BizTalk Server Administration Console Right click on the orchestration Contact Create 4 Inthe drop down fields select the appropriate physical ports and confirm with OK Fort Binding Properties M amp SCRM Adapter Test ConbtacE Create Configurations Binding E Configurations O Inbound Ports 5 Binding rpcaontrack Create Contact Create Host O Outbound Ports Static MSCRM_ Contact MSCEM sp_ontact_Create Contact Create rpContracE Create Refers to a port through which the Orchestration receives data from an external entity Specify a Receive Port Cancel Apply Help 5 Hepeat Step 3 and 4 with the orchestrations Delete Contact Fetch Contact Retrieve Contact and Update Contact Seite 44 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk Create R dl amp Partner The Create method is used to create entity records Request Messagetype Response Messagetype 1 Create an orchestration looking like this Port Surface er m Port Surface FpAccount CRM Operation
22. line2 gt lt addressl_ city gt Bamberg lt addressl city addressl country D addressl country lt addressl postalcode gt 96052 lt addressl postalcode gt lt address2_addressid gt A81F690E FB22 DB11 92AE 0050DA4615A6 lt address2_ addressid gt lt ownerid type 8 name BizTalk dsc 0 gt 51ACBF89 91EC DA11 900D 0050DA4615A6 lt ownerid gt lt donotsendmm name Yes gt 0 lt donotsendmm gt lt merged name No gt 0 lt merged gt lt account gt 5 The data can now be processed Advantage Note that the response message contains all attributes of the entity even the attributes provided in the request message You can directly continue to work with this data 2013 R dl Consulting AG Seite 41 var MS CRM Adapter for Microsoft BizTalk Connecting to CRM Online If you want to connect to CRM Online please follow the steps 1 3 from Working with the adapter in Visual Studio 2010 Designtime and continue with the steps below 4 On the Security tab you have to choose the client credential type Username and provide a valid Windows Live Id account This account has to have enough rights on the CRM Online system Configure Adapter security URI Properties Binding Properties Client credential type Username User name credentials User name yaurnametewaurdomain com Password Pe Client certificate lssued by E spiration Browse Remove Cancel Seite 42
23. lt xs element minOccurs 0 name address 1_addressid type tns quid gt xs element minOccurs 0 name address1 city type xs string gt lt xs element minOccurs 0 name address 1_composite type xs string gt lt xs element minOccurs 0 name address1 country type xs string gt lt xs element minOccurs 0 name address 1_county type xs string gt lt xs element minOccurs 0 name address 1_fax type xs string gt lt xs element minOccurs 0 name address 1_freighttermscode type xs int gt lt xs element minOccurs 0 name address1 latitude type xs double gt lt xs element minOccurs 0 name address 1_line 1 type xs string gt lt xs element minOccurs 0 name address 1_line2 type xs string gt lt xs element minOccurs 0 name address 1_line3 type xs string gt lt xs element minOccurs 0 name address 1_longitude type xs double gt lt xs element minOccurs 0 name address 1_name type xs string gt lt xs element minOccurs 0 name address 1_postalcode type xs string gt lt xs element minOccurs 0 name address 1_postofficebox type xs string gt lt xs element minOccurs 0 name address 1_primarycontactname type xs string gt lt xs element minOccurs 0 name address 1_shippingmethodcode type xs int gt lt xs element minOccurs 0 name address 1_stateorprovince type xs string gt lt xs element minOccurs 0 name address 1_telephone 1 ty
24. value 4711 gt eZns filter lt nsO entity gt lt ns0 fetch gt The response message will be a message of type AccountList Inthe subsequent Decide shape you will have to evaluate the value of the element count count value Consequence eO ieh created OO eee en updated 1 gt 1 More than one Account with this number was found This is possible because there are no unique indexes for this field in MS CRM We won t deal with this case in the example In the Create condition of the Decide shape the following code should be used System Convert Tolnt32 msgAccountList count 0 Inthe case of a Create we can now pass the Account message directly to the Create function If the record should be updated we need to include the AccountlD in the message In our example this happens by using a mapping After that the Update function can be called with the newly generated Account message Since the R amp P MS CRM WCF Adapter for MS BizTalk is bidirectional finally the respective responses of the CRM system will be sent to each send port Seite 58 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 1 Create a new orchestration looking like this Port Surface amp 3 e gt Port Surface Operation 1 Request msgAccount ir Ee Da a a a a a E NES IN r i Account Fetch N i I i H i JE Account to Fetch N i L F aen e pm
25. 5555 Roedl ssl False Connection status Connected Select contract type Search in category Entities Select a category Available categories and operations Node ID E Entities Microsoft Crm Sdk Types account Misc accountleads Microsoft Crm Sdk Types accountleads H XRM Operations activitymimeattachm Microsoft Cm Sdk Types activitymimeattachment z CRM Operations activityparty Microsoft Crm Sdk Types activityparty d a os T FEE s nom mu Seite 18 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 9 Inthe treeview four groups appear Entities contains all entities found in the target system even custom entities Misc special functions such as Fetch XRM Operations all possible WCF operations of the XRM object model especially metadata operations CRM Operations all possible WCF operations of the CRM object model such as assign owner 10 Select the desired entities and functions and add them with the o a button Select a binding Configure a URI am Binding xm vpccm2l13dev 1 5555 Demo ssl False Example xrm vpccrmm201 1rc 5555 Hoedl ssl False Connection status Connected Select contract type Search in category Entities Client Outbound operations W Select a category Available categories and operations Name Node ID E Entities account Microsoft Cm Sdk Types account H Misc accountleads
26. A6 lt ownerid gt lt modifiedon date 03 08 2011 time 1 19 PM gt 2011 03 08T13 19 44 02 00 lt modifiedon gt lt mobilephone gt 01234 lt mobilephone gt modifiedby dsc 0 name modifier gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt modifiedby gt lt lastname gt Kirk lt lastname gt lt address2 addressid gt 617A99B9 AC5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt 7 contact gt The CRM system has deleted the record and provides the complete record data as response The contactid is not contained because the record with this unique identifier doesn t exist anymore 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Fetch The Fetch method is used to search entity records based on several criterias Request Messagetype Response Messagetype ContactList 1 Create a new orchestration looking like this Port Surface x Port Surface rpContact Fetch MSCRM Contact K Operation 1 e ES t Create Request E Receive 3 Request 4 Response Hen Lir spContact_List Send 1 Delete Operation 1 e 3 Request Request ES g Response _ E M Receive 2 We Fetch H Request ad 98 Response Send 2 Retrieve e 3 Request d Response Update 3 Request 4 Response 2 Create an XML message file to search for one or more records For example contact fetch
27. In the file crm Fetch xsd is the schema for the Fetch message in the file crm Fetch xsd And an XML file containing the binding configuration for the send port 02013 R dl Consulting AG Seite 31 var MS CRM Adapter for Microsoft BizTalk Step 4 Creating the Orchestration 1 Create a new Orchestration named CreateAccount 2 Inthe Orchestration Designer you will need three logical ports in the Port Surface e A One way Receive Port rpCreateAccount e A One Way Send Port spCreateAccount e A Request Response Port MSCRM_WCF 3 Right click on the left Port Surface and choose New Configured Port ET Port Surface lt lt New Port New Configured Port New Role Link 4 Paste Cirl V ECH Properties Window Zoom k 4 Inthe appearing wizard click wes Port Configuration Wizard Welcome to the Port Configuration y gt Wizard aka 18 Pr a This wizard helps you to configure a port BizTalk Server 2010 In the Orchestration Designer Send and Receive activities connect to Ports so that they cansend and receive messages Seite 32 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 5 Type in rpAccount in the field Name and click wet Port Configuration Wizard Port Properties Enter the required properties for the new port 6 Enter rpAccount Type in the field Port Type Name Leave all other settin
28. Labels type ns0 LocalizedLabel gt lt xs element name UserLocalizedLabel type ns0 LocalizedLabel gt lt xs sequence gt S SolutionUniqueN ame B CreateOptionSetResponse Sample schema for a CRM function ConvertQuoteToSalesOrder ConvertQuoteToSalesOrder_schema xsd X E ConvertQuoteT oSalesOrder lt xml version 1 0 encoding utf 16 CH Quoteld lt xsischema xmins b http schemas microsoft com BizT alk 2003 xmins ns0 Microsoft Cim Sdk Messages ConvertQuoteT oS alesOrder elementFormDefaul B A ColumnSet targetNamespace Microsoft Crm Sdk Messages ConvertQuoteT oS alesOrder version 1 0 xmins xs http www w3 0rg 2001 7XMLSchema gt 2 AllColumns lt xs annotation gt lt xs appinfo gt me 5 Columns lt fileNameHint mlnsz http 77schemas microsoft com servicemodel adapters metadata xsd ConvertQuoteT oS alesOrder_schema lt x fileNameHint gt ES ConvertQuoteT oS alesOrderResponse us appinfo CG Entity lt xs annotation gt IS LogicalName lt xs element name ConvertQuoteT oS alesOrder gt S Id lt xs annotation gt Attributes xs documentation EntityState lt doc action ln E xmlns docz http 7 schemas microsoft com servicemodel adapters metadata documentation Microsoft Crm S dk Messages ConvertQuoteT oS Formattedv alues n xs documentation RelatedEntities due annotation lt xs complexT ype mm Imm m Seite 22 2014
29. M Adapter for Microsoft BizTalk WCF XRM Adapter Installation under 64 Bit Background Currently the XRM adapter installation process does not support 64 bit Nevertheless the adapter itself has been compiled for any CPU which means the assembly will JIT to 64 bit code when loaded into a 64 bit process and 32 bit code when loaded into a 32 bit process The installer only registers the assemblies in the 32 bit machine configuration which makes it unusable under 64 bit for BizTalk However as long as there is no update to fix that issue there is an easy manual process to fix that Manual Registration Instruction It would be useful to use the entries in the 32 bit machine configuration as an template via copy and paste Remark You will need administrative rights to change the machine configuration file Copy the template 1 Browse to folder Windows Path Microsoft NET Framework v 4 0 xxxxx Config and open the file machine config 2 Navigate to the node configuration system serviceModel and find the entries XrmAdapter under lt bindingElementExtension gt and xrmBinding under lt bindingExtension gt a The entry XrmAdapter should look like depending on installed version lt add name XrmAdapter type Roedl Adapters XRM XrmAdapterBindingElementExtensionElement Roedl Adapters XRM XrmAdapter Version 1 4 xx xx Culture neutral PublicKeyToken f06782905cde877e b The entry xrmBinding should look like depending on installed ver
30. Please read them They apply to the software named above which includes the media on which you received it if any The terms also apply to any Microsoft IV I accept the terms in the License Agreement Accept the license terms and click on Next ie Windows Communication Foundation LOB Adapter SDK Setup Choose Setup Type Choose the setup type that best suits your needs Installs the most common program features Recommended for most users Custom Allows users to choose which program features will be installed and where they will be installed Recommended for advanced users Complete All program features will be installed Requires the most disk space Click on Typical im Windows Communication Foundation LOB Adapter SDK Setup Ready to install Windows Communication Foundation LOB Ada Click Install to begin the installation Click Back to review or change any of your installation settings Click Cancel to exit the wizard Click on Install ie Windows Communication Foundation LOB Adapter SDK Setup Completed the Windows Communication Foundation LOB Adapter SDK Setup Wizard Click the Finish button to exit the Setup Wizard Gancel Click on Finish to end the installation Seite 8 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Installation Windows Identity Foundation KB974405 Install the Windows Identity Foundation
31. Service schemas microsoft com 2003 10 Serialization_Arrays xsd OrganizationService schemas microsoft com crm 2011 Contracts xsd OrganizationService_schemas_microsoft_com_xrm_2011_Contracts xsd a OrganizationService_schemas_microsoft_com_xrm_2011_Contracts_Services xsd OrganizationService schemas microsoft com xrm 2011 Metadata xsd e Solution Explorer Team Explorer 2013 R dl Consulting AG Seite 3 var MS CRM Adapter for Microsoft BizTalk Now let s consider the generated schema for the entities in BizTalk Server Roedl BizTalk Microsoft Visual Studio Administrator File Edit View Project Build Debug Team BizTalk Data Tools Test Wi 21 201 Gol a33m 9 cC 3 3 b Debug OrganizationService ntracts Services xsd X gg Schema z Create B ns1 Attributes E nst KeyValuePairOfstringany Type S ns5 key ns5 value S ns1 EntityState ns1 FormattedValues 3 ns1 KeyValuePairOfstringstring S ns5key 5 ns5 value cl ns1 ld S ns1 LogicalName ns1 RelatedEntities 3 4 ns1 KeyValuePair fRelationshipEntityCollectionX_PsK4FkN D C ns5key S ns1 PrimaryEntityRole ns1 SchemaName CJ ns5 value Cl ns1 Entities ns1 Entity Cl ns1 EntityName S ns1 MinActiveRow Version 5 ns1 MoreRecords 5 ns1 PagingCookie 5 ns1 TotalRecordCount S ns1 TotalRecordCount Limit Exceeded GC CreateResponse 3 CreateResult XOGIOOL gt
32. Talk Server 2010 and Microsoft Dynamics CRM 2011 The adapter must be installed on the BizTalk Server It can be used with Microsoft BizTalk Server 2010 On the MS CRM server no further installations are required because the R amp P MS CRM WCF Adapter for MS BizTalk communicates with Microsoft Dynamics CRM 2011 via the original WCF service The R amp P MS CRM WCF Adapter for MS BizTalk is designed generically This means that the adapter doesn t contain any explicit functionality for processing individual entities or request methods The advantage of this generic approach is that entities and attributes created in MS CRM can be used too No customizing of the MS CRM system needed Why an adapter when Microsoft Dynamics CRM provides a WCF interface Unlike earlier versions Microsoft Dynamics CRM 2011 provides a native WCF service you can use directly in the MS BizTalk Server But dealing with this service is anything but simple If you create a service reference for this WCF service you will receive the following entries in your BizTalk solution Solution Explorer Ix ES melle m See Li un Adapter Sample 1 project bi al ere H ba References al OrganizationService BindingInfo xml OrganizationService odx aj OrganizationService Custom BindingInfo xml OrganizationService schemas datacontract org 2004 07 System Collections Generic xsd Si OrganizationService schemas microsoft com 2003 10 Serialization xsd Organization
33. ality is running in Microsoft Dynamics CRM 2011 and 2013 Systems For 3013 Systems we write a special action method which call al the fetch functions direct on the CRM System The Adapter recognizes if the CRM System is a 2011 or a 2013 System If the CRM System is a 2013 System the Adapter also recognize if the Roedl Action Plugin is installed If the Roedl Action Plugin is installed all fetch statements for Update and Lookups are running on the CRM Server BizTalk Server gt WCF CRM Adapter CRM 2011 create ddate Upsert Lookup Code Lex LL p e create upddate BizTalk Server WCF CRM Adapter Upsert Lookup Code CRM 2013 BizTalk Server gt WCF CRM Adapter Action Plugin CRM 2013 t ddat Upsert Lookup Code create updda S For the new functionalities we need additional information in the schemas Especialy for that we create a new Schema type for the adapter The schema type ist entityCustomAction This schema includes the entity schema and the roedlUpsert schema For the UPSERT functionality this new entityCustomAction have to be send with the adapter In the virtual send port we need for that a new action upsert account B accountList count P account P accountLustaomAction CH account P roedlUpser 2013 R dl Consulting AG Seite 53 var MS CRM Adapter for Microsoft
34. apter named xrmBinding appears Because the adapter is based on the Microsoft XRM Framework and provides Microsoft Dynamics CRM 2011 functions as well as Microsoft XRM functions the binding is called xrmBinding Installation Prerequisites Installation LOB Adapter SDK Install the LOB Adapter SDK for your server architecture x64 x86 You can find the download here http www microsoft com en us download details aspx id 10903 for 2010 htto www microsoft com en us download details aspx id 39630 for 2013 After download run the AdapterFramework msi ie Windows Communication Foundation LOB Adapter SDK Setup ell x Welcome to the Windows Communication Foundation LOB Adapter SDK Setup Wizard The Setup Wizard allows you to change the way Windows Communication Foundation LOB Adapter SDK features are installed on your computer or to remove it from your computer Click Next to continue or Cancel to exit the Setup Klick on next 2013 R dl Consulting AG Seite 7 R dl amp Partner MS CRM Adapter for Microsoft BizTalk fe Windows Communication Foundation LOB Adapter SDK Setup End User License Agreement Please read the following license agreement carefully MICROSOFT SOFTWARE LICENSE TERMS MICROSOFT WINDOWS COMMUNICATION FOUNDATION LINE OF BUSINESS ADAPTERS SDK 2010 These license terms are an agreement between Microsoft Corporation or based on where you live one of its affiliates and you
35. at this for all methods and enter the following schemas Fetch AccountList 16 Now the port is ready to send the messages to MS CRM 17 Now you need the send and receive shapes in the orchestration Choose the appropriated shapes from the toolbox and drag them into the orchestration Seite 36 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Create Account adx X Port Surface lt lt e Port Surface rpCreate Account E dh MSCRM WCF Operation 1 DMQO 93 3 LL pD Create Request B Receive Account jest nn spCreatesccount a gt i E EE Delete E Request Operation 1 Request 14 ge 48 Response HEEL US 11 Zeiefeieisieiefeisfsfeieisiefsfefeieiefrfsfsisisisisfet a a Bebe Receive Account T Request L EE 48 Response a ke Fetch Send Account 3 Request 4 Response Retrieve Request s Response Update a Request 4 Response 18 Now the message for the orchestration will be created Orchestration view E Create Account BE rchestration Properties Orchestration Parameters H A Ports CL Messages o Ce msgAccount Properties msgAccount Message ME Description Identifier msg4ccount Message Type Roedl MSCRM Adapter WCF CRM account schema account Object Type Message Report To Anal True 19 Assign the message to the send and receive shapes and connect th
36. d lt xs complexT ype S LanguageCode lt xs element gt S IsManaged lt xs element name CreateO ptionSetResponse gt S IsCustomOptionSet lt xs annotation gt S IsGlobal lt xs documentation gt S IsManaged doc action 2 IsCustomizable j a a aa cnn METRUM IE NM 4s documentation 2 valie lt xs annotation gt S CanBeChanged lt xs complexT ype 5 ManagedPropertyLogicalN ame lt xs sequence gt tj Name lt xs element name OptionS etl d type ns0 Guid gt S ptionSetType ss sequence S Metadatald lt xs complexT ype s element xs complexT ype name Option etMetadataBase gt lt xsisequence gt amp j OptionSetld lt xs element name Description type ns0 Label gt lt xs element name DisplayN ame type ns0 Label gt lt xs element minOccurs 0 name IsCustomO ptionS et type xs boolean gt lt xs element minOccurs 0 name lsGlobal type xs boolean gt lt xs element minOccurs 0 name IsManaged type xs boolean gt lt xs element name lsCustomizable type ns0 B ooleanM anagedProperty gt lt xs element name Name type xs string gt lt xs element minOccurs 0 name O ptionS etT ype type ns0 OptionSetType gt lt xs element minOccurs 0 name Metadatald type ns0 Guid gt lt xsisequence gt lt xs complexT ype lt xs complexT ype name Label gt lt xsisequence gt lt xs element maxOccurs unbounded name Localized
37. dapter 3 After a short time an XML file will appear in the folder C CreateAccount Response It will be named something like DE15B859 B2AD 4B5D 9A46 5A2CDBE2281C xml 4 The content of this file shows the data of the created account Some system attributes created by the CRM system will appear too lt xml version 1 0 encoding utf 8 gt lt account xmlns http Roedl BizTalk Schemas MSCRM account gt lt accountid gt A61F690E FB22 DB11 92AE 0050DA4615A6 lt accountid gt lt owningbusinessunit gt C4991D79 06EB DA11 A201 0050DA4615A6 lt owningbusinessunit gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt name gt Roedl Consulting AG lt name gt lt createdon time 4 19 PM date 03 08 2007 gt 2011 03 08T16 19 24 02 00 lt createdon gt lt createdby name BizTalk dsc 0 gt 51ACBF89 91EC DA11 900D 0050DA4615A6 lt createdby gt lt modifiedon time 4 19 PM date 03 08 2007 gt 2011 03 08T16 19 24 02 00 lt modifiedon gt lt modifiedby name BizTalk dsc 0 gt 51ACBF89 91EC DA11 900D 0050DA4615A6 lt modifiedby gt lt statecode name Active formattedvalue 0 gt 0 lt statecode gt lt statuscode name Active formattedvalue 1 gt 1 lt statuscode gt lt addressl_ addressid gt A71F690E FB22 DB11 92AE 0050DA4615A6 lt addressl1 addressid gt addressl name gt Roedl Consulting AG addressl name gt lt addressl_ linel Laubanger address1 linel gt lt addressl_ line2 23 address1
38. dio 2005 A A bin 11 03 2011 15 57 1 visual Studio 2008 Visual Studio 2010 d obj 11 03 2011 10 39 A Backup Files A Froperties 11 03 2011 10 39 Code Snippets BB wcfSendPort_xrmadapterBinding_Custom bindinginfo xml 11 03 2011 15 57 5 cee UU A BizTalk Server Project1 A BizTalk Server Project Roed MSCRM Adapter gt Roedl MSCRM Adapter A bin Js obj A Properties A Test pp A wvSMacrosSd A Settings di StartPages i Templates D File name WefSendPort_XtmAdapterBinding_Custom bindinginfo xnl BizTalk bindings files xml am E Arrange by Folder Navigate to your VS Solution and select the appropriated XML file for the binding configuration Confirm the import and the send receive port will be created automatically 2013 R dl Consulting AG Seite 23 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 4 You must enter your credentials again usually only the password and the send port to Microsoft Dynamics CRM is almost fully configured Send Ports Mame Status ORI Transpoart Type Handler C gt Send Account Q Started L BizT alk FileDropsCRM FILE BizT alkServert EC Wchendb ot rm dapter gt Started rm vpecrm201lldew1 56 WE Lustom BizT alkServerc CreateAccount Q3 Started L BizTalk FileDropsCreat FILE BizT alkServer ew CS lcd SS cca ant GA Crark CL EG ST I Cila raeh lc dot CWC DAT I c men i E WefSendPort_XrmAdapterBinding Multiple
39. done in our WS adapter We will discuss this point later in detail For each entity a schema will be created which contains only the attributes of the several entities These individual schemas are well arranged and fast Furthermore the communication with MS CRM has been simplified There will be no special schemas for request and response required anymore but everything is focused on the entity you want to work with Seite 6 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Example Account Schema for Request Schema for Response Insert account jaccount Update account account Delete account sf account Retrieve account sf account Fetch feth sf accountList Upsert accountCustomAction account Security The R amp P MS CRM WCF Adapter for MS BizTalk communicates directly with the original Microsoft Dynamics CRM 2011 WCF service interface The same security rules take effect as if you were working with the WCF service itself Installation and configuration the Adapter Installation With the distribution of the adapter you will receive an executable installation file You can choose between the 32bit and the 64bit installation which depends on the Windows Server you use for your BizTalk integrations For installing the adapter administrative rights are necessary After completing the installation a new binding for the WCF Custom ad
40. donotpostalmail name Allow gt 0 lt donotpostalmail gt lt donotbulkemail name Allow gt 0 lt donotbulkemail gt lt createdon time 1 32 PM date 03 08 2011 gt 2011 03 08T13 32 57 02 00 lt createdon gt lt creditonhold name No gt 0 lt creditonhold gt lt createdby name creator dsc 0 gt 4CACBF8 9 91EC DA11 900D 0050DA4615A6 lt createdby gt modifiedon time 1 32 PM dates 03 08 2011 2011 03 087T13 32 57 402 00 modifiedorn modifiedby name modifier dsc 0 gt 4CACBF8 9 91EC DA11 900D 0050DA4615A6 lt modifiedby gt lt statecode name Active formattedvalue 0 gt 0 lt statecode gt lt statuscode name Active formattedvalue 1 gt 1 lt statuscode gt addressl addressid gt DAC68592 AE5A DB11 ACC2 0050DA4615A6 lt addressl addressid gt address2 addressid gt DBC68592 AE5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt ownerid type 8 name owner dsc 0 gt 4CACBF8 9 91EC DA11 900D 0050DA4615A6 lt ownerid gt lt merged name No gt 0 lt merged gt lt donotsendmm name Yes gt 0 lt donotsendmm gt lt contact gt E contac Lid 5 The CRM system has founded some records based on the given criteria and provides these data via the ContactList These contact records may now be transformed to Contact objects Seite 52 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner New Upsert and Lookup functionalities The new function
41. e to select I ll always be sending messages on this port in the field Port direction of communication All other information remains the same For the port MSCRM WTCF you have to create a port with multiple so called operations namely Create Update Delete Retrieve Fetch and Execute Now your orchestration should look like this Create ono gt ee Port Surface e Port Surface rpCreate Account MSCRM WC Drop a shape Operation 1 from the toolbox Request here spCreateAccount Operation_1 Request E 2013 R dl Consulting AG I Request Response Delete J Request Response Execute J Request Response Fetch a Request Response Retrieve J Request Response Update J Request Response Create Seite 35 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 14 Select the operation Request of the Create method In the property section select the account schema EM srpmscrm i Ei Create E Request P Ej Response SR a Delete ly Request l Response Ei Execute ly Request LB Response ci Fetch o lS Request AES a Response SC a Retrieve i ly Request heen E Response Ei Update Request Multi part Message Types 1 Correlation Types Role Link Types E Orchestration View kk ESINGEN Properties Request Operation Message Me 4 Message Direction Request Name Request Object Type Operation Message 15 Repe
42. em TT a D e msgrFetchAccount MSCRM a meg ccountlist Create rn EZ Request E P A Response Create or Update pales 4 9 Request Create Else Response Ef Fetch ES m i ad ra n Request Create Account Meno uo 38 Response i I men ES Retrieve j I I i Request eech Account to Upda q Operation 1 ES F Update Request Send Result ES EZ Request Update Account 38 Response sp amp ccaunt Update m Operation 1 n Update Account Request E Send Result 02013 R dl Consulting AG Seite 59 var MS CRM Adapter for Microsoft BizTalk 2 Create an XML message file to create a new record For example contact create xml lt xml version 1 0 encoding utf 8 gt lt account xmlns http Roedl BizTalk Schemas MSCRM account gt lt accountnumber gt Roedl Consulting AG lt accountnumber gt lt name gt Roedl Consulting AG lt name gt lt addressl name Roedl Consulting AG addressl name addressl linel Laubanger address1 linel gt address line2 gt 23 lt address1_ line2 lt addressil _city gt Bamberg lt address1 _city gt lt addressl_ country D addressl country lt addressl postalcode gt 96052 lt addressl postalcode gt lt account gt Attention Take care of the namespace It has to be the same as given in the Contact schema 3 C
43. em with the logical ports After that your orchestration should look like this 2013 R dl Consulting AG Seite 37 R dl amp Partner Create Accountods gt E Port Surface lt lt rpCreate Account Operation 1 Request E _spCreateAccount Operation 1 Request HO ni 20 The orchestration is now ready to be deployed Eupen oed MSCA GI Roedl MSCRM Adapter ISCRM Adapter emgeet cnm L Build Solution F6 Sa Properties a References Rebuild Solution Solution bak orchestration od eise Clean Solution morrmlaor ira 1 sere Seite 38 MS CRM Adapter for Microsoft BizTalk gt Port Surface EE i MSCRM Wick SESS F A OH KEKREERKKRKRKKKKERKKRERREKRKKKKEKKKEREKRKIKKRKKKEERKKEEKRKKKRKRKKKKKREERKKEERKKKKKKKKKKREERKRKKKKKKEERKKKERRKRK Create Request E je Response Delete Request CN Response Execute F gt ih M Request Response j d SCH Da SEA Fetch Request Response B L Ha E S Retrieve Request Response Update Request 48 Response GE GE S 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk ROI x Partsier Step 5 Set up the orchestration in the BizTalk Server Administration Console 1 After successful deployment the BizTalk Se
44. est e Receive Custo Create J Request Dre mm Response Send Account Big Upsert A Request ME Response CS m Receive Account bd u sp Account Respon Send Account Operation 1 Request EN 16 Create an XML message file to create a new record Seite 56 For example contact create xml ns0 accountCustomAction xmlns ns0 http Roedl1 BizTalk Schemas MSCRM account gt e nsD0r account ns0 accountnumber 123456 ns0 accountnumber ns addressl oity Nuremberg ns0 addressl city AnsO0 addressl country Geormanye ns address Country nsUtaddr ssl linelsMainstreet 1 ns0raddressl linel ns addressl postalcode 91000 ns 0 addressl postalcode gt ns0 addressl telephonel 449 123456 ns0 addressl telephonel gt lt ns0 emailaddress1 gt JTK Space com lt ns0 emailaddressl gt ns0 name James T Kirkc ns0 name ecna account ns0 roedlUpsert nsO0s conditirion accountnumbers 123456 nsU0 condltion lt ns0 roedlUpsert gt lt ns0staccountCustomAction gt The condtition attribute in all Lookups allows to create a condition like a fetch to describe the key for finding the related object In this examble the adapter fetch in the accounts for an accountnumber with the value 654987 in the attribute accountnumber If the condition is not valid e g result nothing or more than one the adapter throw an error But if the attribute ignore is on true the lookup
45. fe Since the individual attributes of an entity are no longer visible all content from the key value pairs have to be extracted The BizTalk developer needs to know all the attributes and has to enter them into the appropriate functoids When reading from the messages it is still practicable But if you need to fill the messages with the key value pairs the complexity increases significantly Based on Richard Seroter s blog who has dealt extensively with the MS CRM WCF service and how to use it in MS BizTalk we collected some key points more at http seroter wordpress com 2011 02 10 the good bad and ugly of integrating dynamics crm 2011 and biztalk server 2010 Seite 4 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 1 First you have to create a loop for each attribute property of an entity on the KeyValuePairOfstringanyType node because a node must be created for each field e ro IR I e ea Options JL Schema gt lt Schema Demolnput Create 55 Action Type entity 3 E Query ns1 Attributes E Create ns1 KeyValuePairOfstingany Type amp gb LogicalName key de g name value amp E websiteuri ns 1 EntttyState amp fg telephone ns1 Formatted Values de s g accountnumber nslld fe ns 1 LogicalName amp ns1 RelatedEntities des is 2 Then the fields can be mapped on the key element Demo Input Cre j Action Type entity
46. for Microsoft BizTalk Sample schema for an XRM function CreateOptionSet CreateOptionSet schema xsd X CreateO ptionSet lt xml version 1 0 encoding utf 16 2 1 ptionSet lt xs schema xmins b http schemas microsoft com BizT alk 2003 mlns ns0 Microsoft Xrm S dk Messages CreateO ptionS et elementFormDefault qualified 2 Description targetNamespace Microsoft Xrm 5dk Messages CreateOptionSet version 1 0 zmins xs http www w3 org 2001 XMLSchema gt S A LocalizedLabels lt xs annotation gt Kj Label lt xs appinto gt 3 Eg LanguageCode rs fileN cba int xmlns http 7schemas microsoft com servicemodel adapters metadata xsd gt CreateO ptionS et_schema lt fileN ameHint gt due appinfo gt S IsManaged lt xs annotation gt 22 UserLocalizedL abel lt xs element name Create ptionS et Cl Label lt xs annotation gt S LanguageCode lt xsidocumentation gt S IsManaged lt doc action S Ban 5 3 DisplayName N n Microsoft Xrm S dk Messages CreateOptionSet lt doc action gt LocalizedLabels lt xs annotation gt 5 Label lt xs complexT ype Cd LanguageCode us sequence S IsManaged lt xs element name OptionSet type ns0 OptionSetMetadata ase gt GO 2 UserLocalizedL abel xs element name SolutionUniqueN ame type xs string gt S Label s sequence AL Co
47. gs as they are Click wes Fort Configuration Wizard Select a Port Type A Port Type defines the set of operations that are permitted onthe port Select the port type to be used for this port Ce Create a new Port Type C Use an existing Port Type Port Type Name Communication Pattern One Way Request Response Access Restrichons Private limited to the containing module Internal limited to this project C Public no limit 2013 R dl Consulting AG Seite 33 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 7 On the next form no changes are needed Click uet Port Configuration Wizard Port Binding Select an appropriate binding for the new port 8 Click Ks to finish the wizard Port Configuration Wizard You have successfully completed creating a new Port You specified the following configuration Port Name rpAccount Communication This port will be used to receive messages only The binding for this port will be specified through BizTalk Administration Console or by script Seite 34 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk 9 10 11 12 13 R dl amp Partner Your orchestration may look like this Create Accounb adx x Port Surface c e rpCreate Account Drop a shape Operation 1 From the toolbox Request E here Repeat these steps for the send port While configuring the send port you hav
48. he adapter will ignore them 3 Copy the file into the input folder of the receive port Contact Retrieve e g C FileDrop Contact Retrievelin 2013 R dl Consulting AG Seite 47 var MS CRM Adapter for Microsoft BizTalk D Seite 48 After a short while an XML file will appear in the output folder of the send port Contact Retrieve e g C FileDrop Contact Retrieve Out The content should look something like this lt xml version 1 0 encoding utf 8 gt contact xmlns http Roedl BizTalk Schemas MSCRM account lt addressl addressid 607A99B9 AC5A DB11 ACC2 0050DA4615A6 addressl addressid gt lt owningbusinessunit gt C4991D79 06EB DA11 A201 0050DA4615A6 lt owningbusinessunit gt lt donotsendmm name Yes gt 0 lt donotsendmm gt lt statecode name Active formattedvalue Active gt Active lt statecode gt lt statuscode name Active formattedvalue 1 gt 1 lt statuscode gt lt merged name No gt 0 lt merged gt lt createdby dsc 0 name creator gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt createdby gt lt contactid gt 5F7A99B9 AC5A DB11 ACC2 0050DA4615A6 lt contactid gt lt firstname gt James lt firstname gt lt fullname gt James Kirk lt fullname gt lt createdon date 03 08 2011 time 1 19 PM gt 2007 03 08T13 19 44 02 00 lt createdon gt lt ownerid type systemuser dsc 0 name owner gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt ownerid gt lt modifiedon date 03 08 2011 time 1 19 PM
49. her important aspect is the complete compatibility of the new adapter with the old adapter If you are going to switch your BizTalk Server integration from Microsoft Dynamics CRM 3 0 or 4 0 to Microsoft Dynamics CRM 2011 you only need to install the new adapter and switch the ports from the old to the new adapter The solution will run without any restrictions 2013 R dl Consulting AG Seite 5 var MS CRM Adapter for Microsoft BizTalk When using the new adapter aschema of an account may look like this 3 3 accountcategorycode 9 2 accountclassificationcode gl accountid Cd accountnumber 9 2 address freighttermscode 9 2 address latitude S address 1_line1 address 1_line2 S address line3 3 address longtude Xy address name j address postalcode Cd address postofficebox address primarycontactname 9 2 address shippingmethodcode Cd address stateorprovince J address telephone address telephone2 y address telephone3 address upszone SL address utcoffset address2 addressid address2 addresstypecode amp y address2 city Xy address2 country y address2 county d address2 fax address2 freighttermscode 9 2 address2 latitude y address2 ine d address2_line2 address2 ine3 9 2 address2 longitude y address2 name y address2 postalcode Accordingly the mapping will look like this and not like the mapping created with the original WCF service mscrmServ
50. hich is suitable for your server platform x64 x86 lt BizTalk installation source gt BizTalk Server AdapterPack_x86 x64 Start the installation with the AdaptersSetup msi j Microsoft BizTalk Adapter Pack Setup Welcome to the Microsoft BizTalk Adapter Pack Setup Wizard The Setup Wizard allows you to change the way Microsoft BizTalk Adapter Pack features are installed on your computer or to remove it from your computer Click Next to continue or Cancel to exit the Setup Wizard Click on Next fe Microsoft BizTalk Adapter Pack Setup E iol xj End User License Agreement Please read the following license agreement carefully amp MICROSOFT SOFTWARE LICENSE TERMS MICROSOFT BIZTALK SERVER ADAPTER PACK 2010 These license terms are an agreement between Microsoft Corporation or based on where you live one of its affiliates and you Please read them They apply to the software named above which includes the media on which you received it if any The terms also apply to any Microsoft e updates v I accept the terms in the License Agreement Print Accept the license terms and then click on Next i Microsoft BizTalk Adapter Pack Setup iol x Choose Setup Type Choose the setup type that best suits your needs amp Installs only the base adapters No ADO Net providers will be installed Custom Allows users to choose which base adapters and ADO Net providers will be installed and whe
51. ing the schema for Account 1 Open Microsoft Visual Studio NET 2 Create a new BizTalk project named Roedl MSCRM Adapter Installed Templates z E Type BizTalk Projects Visual C eu Empty BizTalk Server Project BizTalk Projects j An empty project for creating a BizTalk Server Projects application Other Project Types Gi BizTalk Server BPEL Import Prdempty BizTalk Server Project Database Test Projects Online Templates Name Roed MSCRM Adapter Location ci users administrator documents visual studio 2010 Projects D Browse Solution create new solution Solution name Roedl MSCRM Adapter v Create directory for solution Add to source control 3 Solution Explorer k 3 BA d Solution Roedl MSCRM Adapter 1 project mmm E amp iu New Item Ctrl Shift A i Existing Item Shift Alt A Add Reference dj New Folder Add Service Reference weie dm Set as StartUp Project Debug Add Solution to Source Control Unload Project Y Open Folder in Windows Explorer i Properties 4 Proceed as described in the section Working with the adapter in Visual Studio 2010 Designtime and create the schema for the entity Account and the function Fetch Misc 5 R amp P MS CRM WCF Adapter for MS BizTalk will create three files 6 In the file entity Account xsd is one schema for the account Account and one schema for the account collection AccountList
52. ke this contact xmlns http Roedl BizTalk Schemas MSCRM contact lt firstname gt Jim lt firstname gt lt fullname gt Jim Tiberius lt fullname gt lt lastname gt Kirk II lt lastname gt lt mobilephone gt 01234 lt mobilephone gt lt contactid gt 733e 35b 1947 db11 acc2 0050da4615a6 lt contactid gt contact 5 The CRM system has updated the record and provides the same message as response Seite 46 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Retrieve The Retrieve method is used for retrieving a single entity record based on the unique identifier Request Messagetype Response Messagetype Contact 0 00 00000000 Contact 1 Create an orchestration that looks like this Port Surface x e Port Surface FpConkact MSCRM Contact Operation_1 NEN Ln n La Request BE BE Create F Request I Response Delete 3 Request splontack Operation_1 Request Ei 48 Response Fetch 3 Request I Response Retrieve Update 3 Request X Response 2 Create an XML message file to retrieve a single record For example contact_retrieve xml contact xmlns http Roedl BizTalk Schemas MSCRM contact lt contactid gt 733ef35b 1947 db11 acc2 0050da4615a6 lt contactid gt lt 7 contact Attention Take care of the contactid so the CRM system can find the desired record The message can also contain further attributes but t
53. le an XML file will be appear in the output folder of the send port Account Create e g C FileDrop Account Create Out The content should look something like this ns0 account xmlns nsO http Roedl BizTalk Schemas MSCRM account ns0 accountnumber 123456 ns0 accountnumber ns0 addressl oity Nuremberg nsU addressl city ns0 addressl country Germany ns 0 addressl country ns sdoress IimeloMainstreet l nsD addressl linet amp ns addressl postalcode 91000 ns0 saddressl postalcode gt nse0 addressl telephonel 49 123456 ns addressl telephonelb lt ns0Q emailaddress1 gt JTK Space com lt ns0 emailaddressl gt ns0 name James T Kirkc ns0 name ns accountid ci26574a 860cd e311 93f3 00155dla5ba6b ns 0 accountid ne0raccounmto Seite 54 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 10 The CRM system has created the record and provides the accountid This can be processed directly in the orchestration 11 Now change the street in the input message ns0 accountCustomAction xmlns ns0 http Roedl BizTalk Schemas MSCRM account gt nslraccount gt ns0 accountnumber 123456 ns0 accountnumber ns0 addressl city gt Nuremberg lt nsO addressl city ns0 addressl country gt Germany lt ns0 addressl country nsD addressl linel gt space Place 1 nsU addressl linel gt lt hel addresel postalscodex x91000 nsUisddressl postalcode
54. mation of the CRM system o URL o Login credentials o Proxy if necessary 2013 R dl Consulting AG Seite 27 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Step 1 Creating the receive port Account 1 Open the BizTalk Server Administration Console 2 Right click on Receive Ports select New and click One way Receive Port E BizTalk Server Administration Console File Action View Help SEIEN Console Root 471 BizTalk Server Administration El gg BizTalk Group WIN H3772QKHPV Hi Applications lt All Artifacts gt i BizTalk System E ii BizTalk Application 1 FE Orchestrations el Role Links 4 Send Port Groups Ea Send Ports E Receive Ports Bj Receive Loca Ej Policies Schemas Lig Maps Li Dimalimac 3 Enter CreateAccount in the Name field and click x F CreateAccount Receive Port Properties Receive Locations Wf A Receive Port is a container For Receive Locations and contains information regarding Inbound Maps the method of authentication transformations and tracking information Tracking Name Creste ccoun Port type One Way Authentication Specify how messages are handled when using authentication Mn authentication C Drop messages if authentication fails C Keep messages if authentication Fails Enable routing for Failed messages Description Cancel Apply 4 Right click on the created receive port select New a
55. mplete the installation 2013 R dl Consulting AG Seite 11 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Installation Roedl Adapter Unzip the zip archive you received with the order and run the Setup exe i3 Microsoft Dynamics CRM 2011 WCF Adapter for BizTalk Server mes x Welcome to the Microsoft Dynamics CRM 2011 WCF Adapter for BizTalk Server Setup Wizard Click on Next i Microsoft Dynamics CRM 2011 WCF Adapter for BizTalk Server Select Installation Folder C Program FilessRadl Consulting AG Microsoft Dynamics CRM 2011 Click on Next i Microsoft Dynamics CRM 2011 WCF Adapter for BizTalk Server Ar Cl x Confirm Installation Le Click on Next Click on Close to complete the installation Seite 12 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Configuration of the Adapter You can use the adapter to e g create modify or delete OptionSet values and publish customizations You will even be able to create modify or delete custom entities and attributes x General Binding Behavior Credentials Messages Import Export Select binding type and click tree nodes to edit binding configuration close Timeout 00 01 00 open Timeout 00 01 00 receive Timeout 00 10 00 sendTimeout 00 01 00 EI XrmAdapterBindingHlement targetNamespace xm Roedl Adapters XRN 2013 R dl Consulting AG Seite 13 var MS CR
56. nd click Receive Location 5 Inthe following window select File in the field Transport Type Seite 28 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk Ras Gt Partsier CreateAccount Receive Location Properties Schedule Name Receive port CreateAccount r Transport Select a transport type and transport address below Type FILE Configure URI C BizT alk4FileDrop Create ccount Request xml Receive handler BizT alkServerApplication x Receive pipeline XMLReceive Microsoft BizT alk DefaultPip JV Hake this the primary location Description E Cancel Apply 6 Select your BizTalk application instance in the field Receive handler If you didn t install a BizTalk Cluster you can only choose the main instance 7 Select XMLReceive in the field Receive pipeline 8 Click Camere FILE Transport Properties General Authentication Batching Receive folder c sBizTalk FileDrop amp Create amp ccountRequest Browse File mask xml Public address Network Failure Retry count 5 Heim interval min 5 Advanced settings Cancel Apply Help 9 Enter the folder C BizTalk FileDrop CreateAccount Request in the field Receive Folder In the other fields leave the default values 10 click LK 11 On the window Receive Location Properties click 0k
57. nn2r nn r an 15 Example Call a CRM entity and process heresponse rr rr nanna 27 Prerequisites untmel nennen nennen nennen RR KKR KRKA RR KKR RR KRKA KKR R RR KRKA KKR RR KS 27 Step 1 Creating the receive port ACCOUNT nossssssssessssssrssrerrrsrrrsrrrrr rss rens narr rss nennen nnn nnne nnns 28 Step 2 Creating the send port Account 30 Step 3 Creating the schema for Account 31 Step 4 Creating the Orchestration ssssssssssssrrrrrrrsressrrrrrrrrenrrrrrrrrrrrn nnne RR RAR nnn nnne RR nn nan 32 Step 5 Set up the orchestration in the BizTalk Server Administration Console 39 Step 6 Testing the Orchestration a user 41 Connecting t CRMONIN E eeren M 42 FURH FS KAN O EE E nee OT E OU en E E E T 44 QC E 45 Nae P 46 misi WP 47 BI Mc 49 UCI see cR c Wr 51 New Upsert and Lookup functionalities mssmsmssssrsssssrrrressrrrrresrrrrrenrrrrrrrrrrrrrrrr rr ers nennen 53 UDSEN an Kc 54 LOOKUP fUNCIONA aep 56 IMDOTL ACCOUNT EE 58 Supported Functions 28 1 1 20 T WEE 61 ERMECMOIDOOS iiie te dia uasa aM IUE PME IDEM I PIN LP REF 61 EE dH MM 61 oeite 2 02014 R dl Consulting AG Introduction Adapter mode of operation The R amp P MS CRM WCF Adapter for MS BizTalk provides a seamless connection between the Biz
58. omization On the other hand schemas will be created in Visual Studio e g account schema These schemas are needed to send and receive messages We call this workspace Designtime Customization Working with the adapter in Visual Studio Designtime 1 To start the adapter wizard right click on your project and select Add and Add Generated Items fea an e1 d Solution Roedl MSCRM WCF Adapter Sample 1 project E ku Roedi MSCRM WCF Adapter Sample Rebuild Deploy Clean jj New Item Oirsshiftea 3 Existing Item Shift Alt A Add Reference New Folder Add Adapter Service Reference Add Service Reference Add Generated Items E View Class Diagram Set as StartUp Project amp sol Debug gt Properti n Add Solution to Source Control Cut Ctrl X jacto osi Z GA Paste Ciri V BPEL X Remove Del Unload Project Open Folder in Windows Explorer d A Properties Alt Enter 2 Inthe following screen select Consume Adapter Service and click Add Add Generated Items Roedl MSCRM WCF Adapter Sample 2 x Installed Templates Sort by Default DI dd Search Installed Templates D El Generated Schema Files 7 Type Generated Schema Files Add Adapter Metadata amp Consume Adapter Service Generated Schema Files ke k 5 Create schema XSD files from WCF LOB Adapter metadata Consume WCF Service Consume Adapter Service Online Templates 02013 R dl Consulting AG Seite 15
59. opy the file into the input folder of the receive port Account Create e g C FileDrop Account Create In 13 After a short while an XML file will be appear in the output folder of the send port Account_Create e g C FileDrop Account Create Out The content should look something like this ns0 account xmlns ns0 http Roedl BizTalk Schemas MSCRM account gt ns0 accountnumber 123456 ns0 accountnumber nsl address l city Nuremberg nsU addressl city ns addressl country Germany ns addressl country ns 0 addressl linel gt Space Place Ie ns0 addressl lin l ns0 addressl postalcode 91000e nsUc amp ddressl postalcode gt ns raddressl telephonel gt 49 123456 ns addressl Telephonel gt lt ns0O emailaddressl gt JTK Space com lt ns0 emailaddressl gt ns0 name James T Kirk lt ns0O name gt ns0 accountid c126574a 8ccd e311 93f3 00155d1a5a6b ns0 accountid ns0 account 14 The accounted is the same because there was an update in CRM 02013 R dl Consulting AG Seite 55 var MS CRM Adapter for Microsoft BizTalk Lookup functionality The lookup functionality is also a new feature and is only working with the entityCustomAction etc accountCustomAction only in the entityCustomAction Request Messagetype Response Messagetype accountCustomAction 15 Create an orchestration looking like this p Port Surface Port Surface rp Customer Operation 1 a ES srp_XRM Requ
60. opy the file into the input folder of the receive port account Create e g C FileDrop Account Create In 4 After a short while an XML file will appear in the output folder of the send port account_Create e g C FileDrop Account Create Out The content should look something like this lt xml version 1 0 encoding utf 8 gt lt account xmlns http Roedl BizTalk Schemas MSCRM account gt lt accountnumber gt Roedl Consulting AG lt accountnumber gt lt name gt Roedl Consulting AG lt name gt lt addressl name Roedl Consulting AG lt addressi_name gt lt addressl_ linel gt Laubanger lt addressl1 linel gt lt addressl_ line2 23 address1 line2 gt lt addressil _city gt Bamberg lt address1 _city gt lt addressl_ country D addressl country lt addressl postalcode 96052 addressl postalcode accountid 733ef35b 1947 dbl11 acc2 0050da4615a6 accountid account 5 The CRM system has created the record and provides the contactid This can be processed directly in the orchestration 6 Modify the message for example as described below and send it to the input folder of the receive port Account Create e g C FileDrop Account Create In lt xml version 1 0 encoding utf 8 gt lt account xmlns http Roedl BizTalk Schemas MSCRM account gt lt accountnumber gt Roedl IT Consulting GmbH lt accountnumber gt lt name gt Roedl Consulting IT Consulting GmbH lt name gt lt addressl name Roedl Consul
61. pe xs string gt lt xs element minOccurs 0 name address 1_telephone2 type xs string gt lt xs element minOccurs 0 name address 1_telephone3 type xs string gt lt xs element minOccurs 0 name address 1_upszone type xs string gt lt xs element minOccurs 0 name address 1_utcoffset type xsint gt lt xs element minOccurs 0 name address2_addressid type tns guid gt lt xs element minOccurs 0 name address2_addresstypecode type xsint gt lt xs element minOccurs 0 name address2_city type xs string gt lt xs element minOccurs 0 name address2 composite type xs string gt lt xs element minOccurs 0 name address2_country type xs string gt lt xs element minOccurs 0 name address2 county type xs string gt lt xs element minOccurs 0 name address2_fax type xs string gt lt xs element minOccurs 0 name address2_freighttermscode type xs int gt lt xs element minOccurs 0 name address2_latitude type xs double gt lt xs element minOccurs 0 name address2_line 1 type xs string gt lt xs element minOccurs 0 name address2_line2 type xs string gt A xsp Turn off auto refresh Sample schema for an entity collection AccountList ZUM mscmService 1 accountiist xsd X Eus spia NON nt ne 2 Schema S E E accountList Is count B account Zil lt Sequence gt accountcategorycode accountcla
62. ptionValue InsertOptionValue UpdateOptionValue Disassociate 02013 R dl Consulting AG Rodl amp Partner PublishAllXml PublishXml PublishDuplicateRule 1 3 26 ProvisionLanguage 1 3 26 ReassignObjectsOwner ReassignObjectsSystemUser Recalculate RemoveltemCampaign RemoveltemCampaignActivity RemoveMemberList RemoveParent RemovePrivilegeRole RemoveProductFromkit RemovesSolutionComponent 1 3 26 RetrieveDeploymentLicense Il ype 1 3 26 RetrieveExchangeRate RetrievelnstalledLanguagePacks RetrievelnstalledLanguagePackVersion RetrieveLicenselnfo RetrieveVersion SendEmail oendFax oetParentBusinessUnit SetParentSystemUser SetState UninstallSampleData UnlockInvoicePricing UnlockSalesOrderPricing WhoAml WinOpportunity Seite 61 Wale MS CRM Adapter for Microsoft BizTalk Contact Roedl Consulting AG Laubanger 23 96052 Bamberg Germany fon 49 951 96619 0 fax 49 951 96619 11 mail bamberg roedl de web http www roedl com integration Features and specifications are subject to change by R dl Consulting AG All rights reserved Reproduction in any manner without prior approval of R dl Consulting AG is strictly forbidden All trademarks and trade names used in this document are the property of their respective companies and manufacturers The R dl Consulting AG disclaims any proprietary interest in trademarks and trade names other than its own Seite 62 2014 R dl Consulting AG
63. re they will be installed Recommended for advanced users Click on Complete i Microsoft BizTalk Adapter Pack Setup ell xl Ready to install Microsoft BizTalk Adapter Pack Click Install to begin the installation Click Back to review or change any of your installation settings Click Cancel to exit the wizard Click on Install Seite 10 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk ROI Gt Partsier Customer Experience Improvement Program gt gt Do you want to join the BizTalk Adapter Pack Customer Experience Improvement Program The program collects information about computer hardware and how you use the BizTalk Adapter Pack without interrupting you This helps Microsoft identify which features to improve No information collected is used to identify or contact you Tell me more about the program Press Ctrl C to copy the URL Join the Customer Experience Improvement Program don twantto join the program at this time Run the installer in the repair mode to change your preferences later Ber Click on OK ie Microsoft BizTalk Adapter Pack Setup i iol xi Completed the Microsoft BizTalk Adapter Pack Setup Wizard Please refer to the Supported Enterprise Application Versions section in the Installation Guide for LOB Client Requirements for the Adapters Click the Finish button to exit the Setup Wizard Gancel Click on Finish to co
64. rver Administration Console should look like this El BizTalk Server Administration Console Console Root Hl BizTalk Server Administration El 33 BizTalk Group WIN H3772QKHPM El Applications lt All Artifacts gt Roedi_MSCRM_Adap fm m BizTalk System Start itt BizTalk Application 1 Stop El Dn MSCRM Adapter Test Enlist 3 Orchestrations Unenlist ixl Role Links Remove j amp Send Port Groups Move To Application Send Ports Fl Receive Ports Tracking Receive Locations ER ES Ea Policies Son La Maps 2 Expand the application node MSCRM_Adapter_Test and click Orchestrations 3 Right click on the orchestration Create Account and select Properties B Roedl MSCRM Adapter Create Account Orchestration Properties General Bindings Bindings Select a host for enlistment and bind any logical ports in the orchestration to physical Tracking ports A new physical port may be created by clicking on the combo box nest to the logical port name Hast BizTalkServer pplication hd Bindings Inbound Logical Ports ES Receive Ports rpCreate Account Create4ccount Outbound Logical Ports E Send Ports Send Port Groups WefS endPork_ trmAdapterB inding_Mullt spCreate4ccount Create4ccount 4 As shown in the screenshot above bind the three physical ports to the virtual ports of the orchestration 2013 R dl Consulting AG Seite 39 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 5
65. se name you have received upon your purchase URI Properties Binding Properties Close Timeout Name Open Timeout Receive Timeout Send Timeout Target Namespace Auto Culture Impersonateld TimeZone ConnectionPool Connection Reuse True MaxAvailableConnect 50 4 Licensing ESTES o9872345089723450987 License Name License Name 2013 R dl Consulting AG Seite 17 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 7 Click Ok to save the configuration and close the window If you do not wish to define your own target namespace the adapter will use the default target namespace xrm Roedl Adapters XRM Of course you can make changes to this setting at any time Select a binding Configure a URI mcm de SES erc TF Example xrm vpccrm201 1rc 5555 Roedl ssl False Connection status Disconnected Select contract type Search in category Client Outbound operations Select a category Available categories and operations Name Node ID 8 Byclicking ewe the adapter authenticates against Microsoft Dynamics CRM 201 1 collects some further information from the system and finally provides you a set of categories to work with Select a binding Configure a URI xm Binding xmm vpccmm2013dev 1 5555 Demo ssl False Example xrm vpccrm201 1rc
66. se your schemas are already generated with this namespace User name credentials Do not use Single Sign On 2 Use Single Sign On Affiliate application Proxy settings For use with http bindings or httphttps transport binding elements Address Example http host part path 9 Enter user name and password on the Credentials tab Depending on the CRM system it could be a domain account or a Windows Live ID account If you are using a proxy enter the data into the fields Address User name and Password 10 No modifications needed on the tabs Messages und Import Export 11 Now the send port is ready for use Seite 26 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner Example Call a CRM entity and process the response In this example an account record will be created and the response will be saved in an XML file Unlike the original Microsoft Dynamics CRM 2011 WCF service the adapter always works with entity objects schemas For both request and response This reduces the effort of the needed schemas and the user does not have to choose which attributes for the several entities are needed Prerequisites Runtime Before starting the implementation of the example some preparations have to be made Create the following folder structure on the BizTalk Server C 5 BizTalk L gt Filedrop 5 CreateAccount Request 5 Response We will need the following infor
67. sed directly in the orchestration 2013 R dl Consulting AG Seite 45 var MS CRM Adapter for Microsoft BizTalk Update The method Update is used for updating entity records Request Messagetype Response Messagetype Conact O Contact 1 Create an orchestration looking like this Port Surface e Port Surface rpLonkach MSCRM_ Contact Operation 1 geg as Create Request BE Receive 1 3 Request 4 Response DS m splantact P Sendi Delete Operation 1 3 Request Request I Response e m Receive 2 Fetch 3 Request ba Response Ke 4 nen Send 2 Retrieve F Request 48 Response Update EX Request U Response 2 Create an XML message file to update an existing record For example contact update xml contact xmlns http Roedl BizTalk Schemas MSCRM contact lt firstname gt Jim lt firstname gt lt fullname gt Jim Tiberius lt fullname gt lt lastname gt Kirk II lt lastname gt lt mobilephone gt 01234 lt mobilephone gt contactid 733ef35b 1947 dbll acc2 0050da4615a6 contactid lt contact gt Attention Take care of the contactid so the CRM system can find the desired record 3 Copy the file into the input folder of the receive port Contact Update e g C FileDrop Contact Update ln 4 After a short while an XML file will appear in the output folder of the send port Contact_Update e g C FileDrop Contact Update Out The content should look something li
68. sion add name xrmBinding type Roedl Adapters XRM XrmAdapterBindingCollectionElement Roedl Adapters XRM XrmAdapter Version 1 4 xx xx Culture neutral PublicKeyToken f06782905cde877e Paste to the 64 bit machine configuration 1 Browse to folder Windows Path Microsoft NET Framework64 v 4 0 xxxxx Config and open the file machine config 2 Navigate to the node configuration system serviceModel and append under bindingElementExtension the copied XrmAdapter entry 3 Navigate to the node configuration system serviceModel and append under lt bindingExtension the copied xrmBinding entry 4 Save the machine config file at this point administrative privileges are needed Now you should have the XRM Adapter fully accessible under 64 bit available within the BizTalk Administration Console after the next Restart of the Console A Important Note for Visual Studio Please do not forget also to install the Microsoft BizTalk Adapter Pack for 32 bit x86 since its crucial for the use under Visual Studio schema generation the process runs only under 32 bit Seite 14 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk ROI Gt P rtter Working with the R amp P MS CRM WCF Adapter for MS BizTalk Working with the R amp P MS CRM WCF Adapter for MS BizTalk is divided into two workspaces On the one hand send ports will be defined that are physically linked with the adapter We call this workspace Runtime Cust
69. ssificationcode accountid S accountnumber accountratingcode 2 address 1_addressid address addresstypecode 5 address city S address country H A 2013 R dl Consulting AG lt xml version 1 0 encoding utf 16 gt lt xs schema xmins b http schemas microsoft com Biz Talk 2003 xminsins http 172 21 5 37 5555 mscrmservices 2006 CrmServiceW sdl aspx account List elementFomDefault qualified target Namespace http 172 21 5 37 5555 mscrmservices 2006 CrmServiceWsdl aspx account List xmins xs http www w3 org 2001 XMLSchema gt xs import schemalocation MnscrmService 1 account xsd namespace http 172 21 5 37 5555 mscmservices 2006 CrmmServiceW sdl aspx account gt lt xs annotation gt lt xs appinfo gt references xmins http schemas microsoft com Biz Talk 2003 lt reference target Namespace http 172 21 5 37 5555 mscrmservices 2006 CrmServiceW sdl aspx account gt lt references gt lt xs appinfo gt lt xs annotation gt lt xs element name account List gt lt xs complexType gt lt xs sequence gt lt xs element name count type xs string gt lt xs element xmins q1 http 172 21 5 37 5555 mscmmservices 2006 CmmServiceW sdl aspx account ref q1 account gt lt xs sequence gt lt xs complex Type gt lt xs element gt lt xs schema gt Seite 21 R dl amp Partner MS CRM Adapter
70. ting AG addressl name addressl1 linel gt Laubanger lt address1_ linel lt addressl_ line2 gt 23 lt addressl1 line2 gt lt addressil _city gt Bamberg lt address1 _city gt addressl country D addressl country lt addressl postalcode 96052 addressl postalcode lt accountid gt 733e 35b 1947 db11 acc2 0050da4615a6 lt accountid gt lt account gt 7 After a short while an XML file will appear in the output folder of the send port account_Create e g C FileDrop Account Create Out Seite 60 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk Supported Functions 28 11 2011 CRM Methods AddltemCampaign AddltemCampaignActivity AddMemberList AddProductT okit Assign CalculateActualValueOpportunity 1 3 26 CalculateTotalTimelncident 1 3 26 Closelncident 1 3 26 CopyCampaign 1 3 26 CopyDynamicListToStatic 1 3 26 CopyMembersList 1 3 26 CancelContract CancelSalesOrder CloseQuote ChecklncomingEmail CheckPromoteEmail ConvertKitToProduct ConvertProductT oKit DeleteAuditData 1 3 26 DeprovisionLanguage 1 3 26 ExecuteWorkflow FulfillSalesOrder GetlnvoiceProductsFromOpportunity 1 3 26 GetTrackingTokenEmail GetQuantityDecimal GetReportHistoryLimit 1 3 26 IsValidStateTransition 1 3 26 InstallSampleData LocklnvoicePricing LockSalesOrderPricing LoseOpportunity XRM Methods Associate CanBeReferenced CanBeReferencing CanManyToMany DeleteAttribute DeleteEntity DeleteOptionSet DeleteO
71. which is suitable for your server platform 6 0 6 1 x64 x86 You can find the download here hitp support microsoft com kb 974405 de After the download run the MSU package Windows Update Standalone Installer x Click OK to install the following Windows software update Update for Windows KB974405 Click on OK 5 Download and Install Updates x dep Read these license terms 1 of 1 You need to accept the license terms before installing updates Update for Windows KB974405 PLEASE NOTE Microsoft Corporation or based on where you live one of its affiliates licenses this supplement to you You may use it with each validly licensed copy of Microsoft operating e for which this supplement is applicable the so Privacy statement http go d 164072 Please note E these license terms are provided below in Remarque RE I EE les termes de cette licence sont fournis ci dessous en francais REMARQUE Microsoft Corporation ou en fonction du lieu o vous vivez l un de ses affili s x Printable version I Dedine I Accept Cancel Click on I Accept 5 Download and Install Updates X dep Installation complete Click on Close to finish the installation 2013 R dl Consulting AG Seite 9 P MS CRM Adapter for Microsoft BizTalk Installation BizTalk Adapter Pack The installation is located on the BizTalk installation medium Install the adapter pack w
72. xml fetch mapping logical xmlns http Roedl BizTalk Schemas MSCRM fetch entity name contact gt all attributes filter type or condition attribute firstname operator eq value James gt z lter gt lt entity gt lt fetch gt Attention Take care of the namespace It has to be the same as given in the entity schema except contact instead of fetch 3 Copy the file into the input folder of the receive port Contact Fetch e g C FileDrop Contact Fetch in 2013 R dl Consulting AG Seite 51 var MS CRM Adapter for Microsoft BizTalk 4 After a short while an XML file will appear in the output folder of the send port Contact_Fetch e g C FileDrop Contact Fetch Out The content should look something like this lt xml version 1 0 encoding utf 8 gt lt contactList xmlns http Roedl BizTalk Schemas MSCRM contactList gt conmnE 2 7count contact xmlns http Roedl BizTalk Schemas MSCRM contact lt contactid gt 5F7A99B9 AC5A DB11 ACC2 0050DA4615A6 lt contactid gt lt owningbusinessunit gt C4991D79 06EB DA11 A201 0050DA4615A6 lt owningbusinessunit gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt firstname gt James lt firstname gt lt lastname gt Kirk lt lastname gt lt fullname gt James Kirk lt fullname gt lt createdon time 1 19 PM date 03 08 2011 gt 2011 03 08T13 19 44 02 00 lt createdon gt lt createdb
73. y name creator dsc 0 gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt createdby gt lt modifiedon time 1 32 PM date 03 08 2011 gt 2011 03 08T13 32 44 02 00 lt modifiedon gt lt modifiedby name modifier dsc 0O gt ACACBF89 91EC DA11 900D 0050DA4A615A6 lt modifiedby gt lt mobilephone gt 01234 lt mobilephone gt lt statecode name Active formattedvalue 0 gt 0 lt statecode gt lt statuscode name Active formattedvalue 1 gt 1 lt statuscode gt lt addressl addressid gt 607A99B9 AC5A DB11 ACC2 0050DA4615A6 lt addressl addressid gt address2 addressid gt 617A99B9 AC5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt ownerid type 8 name owner dsc 0 gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt ownerid gt lt merged name No gt 0 lt merged gt lt donotsendmm name Yes gt 0 lt donotsendmm gt j conLac gt lt contact xmlns http crm logisma de mscrmservices 2007 crmservice asmx contact lt contactid gt D9C68592 AE5A DB11 ACC2 0050DA4615A6 lt contactid gt lt owningbusinessunit gt C4991D79 06EB DA11 A201 0050DA4615A6 lt owningbusinessunit gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt firstname gt James lt firstname gt lt lastname gt Belushi lt lastname gt lt fullname gt James Belushi lt fullname gt lt donotphone name Allow gt 0 lt donotphone gt lt donotfax name Allow gt 0 lt donotfax gt lt donotemail name Allow gt 0 lt donotemail gt lt

Download Pdf Manuals

image

Related Search

Related Contents

Dell PowerConnect W-Airwave 7.2 Practices Guide  130726 HE04M-2 User Manual Elpro web  LR4A User Guide  trasformatore 230/24V  FT Bizkor Albañílería  要求水準書(案) (641kbyte)  DWL 66FS - BYU Cleanroom  manual_de_usuario_pantech_gb310  Samsung BD-P1000 User's Manual  AT-SPB5 取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file