Home
Manual XRM Adapter english
Contents
1. B CreateOptionSet lt xml version 1 0 encoding utf 16 2 3 OptionSet lt xs schema xmins b http schemas microsoft com BizT alk 2003 mlns ns0 Microsoft Xrm S dk Messages CreateO ptionS et elementFormDefault qualified 3 A Description targetNamespace Microsoft Xrm S dk Messages Create ptionS et version 1 0 mlns xsz http www w3 org 2001 7XMLS chema 5 E p S A LocalizedLabels lt xs annotation gt Label lt us appinfo gt 3 lt fileN ameHint mlnsz http schemas microsoft com servicemodel adapters metadata xsd gt CreateD ptionSet_schema lt fileN ameHint gt j LanguageCode ss appinfo S IsManaged lt xs annotation gt 3 UserLocalizedLabel lt xs element name CreateO ptionS et 65 Label lt xs annotation gt G lt xs documentation gt S LanguageCode S IsManaged lt doc action gt n xmins doc http schemas microsoft com servicemodel adapters metadata documentation gt Microsoft Xrm S dk Messages Create ptionS et doc action DisplayName 7 lt xs documentation gt a a us lt xs annotation gt Sj Labe lt xs complexType gt amp y LanguageCode lt us sequence gt S IsManaged lt xs element name OptionSet type ns0 OptionSetMetadataBase gt S E UserLocalizedLabel lt xs element name S olutionUniqueN ame type xs string gt amp Label lt xs sequence gt lt
2. CRM 2011 t ddat Upsert Lookup Code EV 2 create upddate BizTalk Server gt WCF CRM Adapter Upsert Lookup Code CRM 2013 BizTalk Server gt WCF CRM Adapter Action Plugin lt CRM 2013 Upsert Lookup Code mm 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 S account B accountList i we S count H iz account 5 accountCustomAction g iz account H iz roedlUpser Seite 48 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft 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 rp Customer Operation 1 L 23 srp XRM Request nl Receive Custo Create J Request ba Response T Send_Account te Upsert Request 22 Response Receive Account c LJ sp Account Respon Send Account Operation 1 Request EN 7
3. ns1 RelatedEntities BBSNR fe BEGRU fe BRSCH fe BUBKZ e DATLT fe FAKSD FISKN fe KONZS fe KTOKD fe KUKLA fe LAND1 e LIFNR fe LIFSD fe LOCCO e LOEVM fe NAME NAME2 NAME3 da NAMES fe NIELS fe ORTO1 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 201 1 02 10 the good bad and ugly of integrating dynamics crm 201 1 and biztalk server 2010 Seite 4 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 s fl Q JA Options Schema Schema Demolnput Create 5 Action Type entity 3 E Query ns1 Attributes fE E Create ns1 KeyValuePairOfstingany Type amp eb LogicalName key amp g name value amp sh websiteuri ns 1 EnttyState amp
4. 7 On the next form no changes are needed Click uet Port Configuration Wizard Port Binding Select an appropriate binding for the new part 8 Click cs to finish the wizard Port Configuration Wizard Completing the Port 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 2013 R dl Consulting AG Seite 29 R dl amp Partner 9 10 11 12 13 Seite 30 MS CRM Adapter for Microsoft BizTalk Your orchestration may look like this Create Accounb adx X Port Surface ke e Drop a shape From the toolbox here rpCreate Account Operation 1 Request E Repeat these steps for the send port While configuring the send port you have 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 WCF 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 cono HH Port Surface e gt Port Surface rpCreate Account MSCRM WCF Drop a shape from the toolbox here Operation_1 Create Request gt Request Response
5. Delete J Request Response Execute E J Request Response spCreateAccount Fetch J Request Response Operation 1 Request E i Retrieve I Request Response i Update J Request Response 02014 R dl Consulting AG 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 B srpmscrm GHB create ln A A spanse ci Delete ly Request L Response ci Execute lB Request A Response Ei Fetch E Request ali Response ci Retrieve EL Request i L Response Ei Update B Request B Multi part Message Types d Correlation Types X Role Link Types EA Orchestration view ct T Re EE ur ee Properties Request Operation Message RE 4 Message Direction Request Mame Request Object Type Operation Message 15 Repeat this for all methods and enter the following schemas 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 2013 R dl Consulting AG Seite 31 R dl amp Partner Create Account adx X Port Surface lt lt rpCreate Account Operation 1 Request FREE Operation 1 f i Request E EEEH MS CRM Adapter for Microsoft BizTalk e P
6. R dl amp Partner 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 2xml v rsion li0 encoding utr 8 5 lt contactList xmlns http Roedl BizTalk Schemas MSCRM contactList gt lt count gt 2 lt count gt lt 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 08T713 19 44 02 00 lt createdon gt lt createdby name creator dsc 0 gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt createdby gt lt modifisdon time 1 32 PM date 03 08 2011 gt 2011 03 06T13 32 44 02 00 lt moditiredon gt lt modifiedby name modifier dsc 0 gt 4CACBF8 9 91EC DA11 900D 0050DA4615A6 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
7. 1 name address2_addresstypecode type tns Picklist gt r E address2 fax lt xs element minOccurs 0 maxOccurs 1 name address2 city type xs string gt H address2_freighttermscode lt xs element minOccurs 0 maxOccurs 1 name address2 country type xs string gt 3 address2 latitude lt xs element minOccurs 0 maxOccurs 1 name address2_county type xs string gt t address2 line1 lt xs element minOccurs 0 maxOccurs 1 name address2 fax type xs string gt address2 line2 lt xs element minOccurs 0 maxOccurs 1 name address2_freighttermscode type tns Picklist gt a l address line3 lt xs element minOccurs 0 maxOccurs 1 name address2 latitude type tns CrmHoat gt ge kan m lt xs element minOccurs 0 maxOccurs 1 name address2 line 1 type xs string gt Poe lt lt xs element minOccurs 0 maxOccurs 1 name address2 line2 type xs string gt IS address2 name lt xs element minOccurs 0 maxOccurs 1 name address2_line3 type xs string gt S address2 postalcode lt xs element minOccurs 0 maxOccurs 1 name address2 longitude type tns CrmHoat gt S address2 postofficebox lt xs element minOccurs 0 maxOccurs 1 name address2 name type xs string gt 6 address2 primarycontactnam lt xs element minOccurs 0 maxOccurs 1 name address2 postalcode type xs string gt H E address2 shippingmethodcoc lt xs element minOccurs 0 maxOccurs
8. i 7 E My Documents al di Integration Services Script Component Documents library Roedl MSCRM Adapter di Integration Services Script Task di SQL Server Management Studio Mame Date modified Arrange by Folder Visual Studio 2005 EX bin 11 03 2011 15 57 Lo Visual Studio 2008 visual Studio 2010 b obj 11 03 2011 10 39 J Backup Files Properties 11 03 2011 10 39 di Code Snippets cFSendPork xrm indi indinain I n Projects di BizTalk Server Projecti m BizTalk Server Project Raedl MSCRM Adapter Roed MSCRM Adapter i bin di obj di Properties di Test pp n VSMacros d di Settings di StartPages Templates 4 File name WefSendPort XrmAdapterBinding Custom bindinginfoxxml BizTalk bindings files xrm a d 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 4 You must enter your credentials again usually only the password and the send port to Microsoft Dynamics CRM 2013 2015 is almost fully configured 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk Send Ports Mame Status ORI Transport Type Handler Send Account F Started C ABizTalktFileDropsCRM FILE BizTalkServer Fd Fr w cfSendPart xrm amp dapter BE Started m z vpecrma2ll1dev1 55 wCF Custom B
9. 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 Click Configure FILE Transport Properties General Authentication Batching Receive folder c sBizTalk FileDrop amp Create amp ccountkRequest Browse File mask xml Public address peats o ooo Network Failure Hetry count Retry interval min Advanced settings Cancel Apply Help 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 Seite 24 02014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk R dl amp Partner 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 Backup Transport Outbound Maps Filters Certificate Tracking Mame Part type Static One Way Transport Select transport type and transport address below Type FILE Configure URI CBT alk FileDropsCreate amp ceount Responze sx M ess Send handler Biz
10. METH ETE Roedllonsulting AG targetMamespace http ARoedl BizTalk chem License Name frma dapterB indingE lement License ame Name Licenze Name Defaultvalue System v Right click enabled m m toe Seite 20 2014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 6 Enter the License Name you ve received upon your purchase 7 Enter the License Code you ve received upon your purchase 8 You should take the default value for Target Namespace because your schemas are already generated with this namespace CF Custom Transport Properties Ei Username credentials Do not use Single Sign On User name Jlogisma de heinz Password LJ LL LI LI LIE LITET C Use Single Sign On Affilate application Frosy settings For use with http bindings or httphttps transport binding elements Address Example http hosti part path User name Password TEMPE 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 02013 R dl Consulting AG Seite 21 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Example Call a CRM e
11. id ad Delete TN Request Response Execute IUNSNNMUELELISUNNSNNNUBEEISSU Request Response Fetch Request un Du Er ra I Response Retrieve Request Response Update Request r ATE Gb E Response E E B DU I I IGI IIIS III IE t 20 The orchestration is now ready to be deployed JS E FT Roedl MSCRM Adapter Build Solution F Sad Properties Rebuild Solution FH References ome tion BizTalk Orchestration od Deploy Solution merrmferare I sere Clean Solution 2013 R dl Consulting AG Seite 33 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Step 5 Set up the orchestration in the BizTalk Server Administration Console 1 After successful deployment the BizTalk Server Administration Console should look like this El BizTalk Server Administration Console File Action View Help e A C Console Root EI Hl BizTalk Server Administration sl Orchestrations EI 33 BizTalk Group WIN H3772QKHPV El Applications GG lt All Artifacts gt fe BizTalk System tti BizTalk Application 1 El m MSCRM Adapter Test C Orchestrations Unenlist ij Role Links Remove G Send Port Groups Mave To Application Cd Send Ports Ed Receive Ports Tracking i Receive Locations Refresh F5 Help 2 Expand the application node MSCRM Adapter Test and click Orchestrations 3 Ri
12. 0 maxOccurs 1 name accountnumber type xs string gt a dress freightt j lt xs element minOccurs 0 maxOccurs 1 name accountratingcode type tns Picklist gt m lt xs element minOccurs 0 maxOccurs 1 name address 1_addressid type tns Key gt H address latitude lt xs element minOccurs 0 maxOccurs 1 name address 1_addresstypecode type tns Picklist gt m 5 address1 line1 lt xs element minOccurs 0 maxOccurs 1 name address1 city type xs string gt 6 address line2 lt xs element minOccurs 0 maxOccurs 1 name address1 country type xs string gt 5 address line3 lt xs element minOccurs 0 maxOccurs 1 name address1 county type xs string gt H E address longitude lt xs element minOccurs 0 maxOccurs 1 name address1 fax type xs string gt E ld address name lt xs element minOccurs 0 maxOccurs 1 name address1 freighttermscode type tns Picklist gt AQ add im iod lt xs element minOccurs 0 maxOccurs 1 name address1 latitude type tns CrmHoat gt lt xs element minOccurs 0 maxOccurs 1 name address 1_line 1 type xs string gt IS address 1_postofficebox lt xs element minOccurs 0 maxOccurs 1 name address1_line2 type xs string gt address primarycontactnam lt xs element minOccurs 0 maxOccurs 1 name address1 line3 type xs string gt E address1 shippingmethodcoc lt xs element minOccurs 0 maxOccurs 1 name ad
13. 1 name address2 postofficebox type xs string gt L address2 stateomprovince lt xs element minOccurs 0 maxOccurs 1 name address2 primarycontactname type xs string gt Ln alan ere lt xs element minOccurs 0 maxOccurs 1 name address2 shippingmethodcode type tns Picklist gt lt xs element minOccurs 0 maxOccurs 1 name address2_stateorprovince type xs string gt N address2 telephone2 lt xs element minOccurs 0 maxOccurs 1 name address2_telephone 1 type xs string gt I mE S address2 telephone3 lt xs element minOccurs 0 maxOccurs 1 name address2_telephone2 type xs string gt 6 address2 upszone lt xs element minOccurs 0 maxOccurs 1 name address2 telephone3 type xs string gt H address2 utcoffset lt xs element minOccurs 0 maxOccurs 1 name address2_upszone type xs string gt H E aging30 lt xs element minOccurs 0 maxOccurs 1 name address2 i utcoffset type tns CrmNumber gt 4 Turn off auto refresh Sample schema for an entity collection AccountList PR mscrmService 1 accountlist xsd X begs aie MR nt ale 3 8 El E accountList lt xml version 1 0 encoding utf 16 gt G count 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 EE account element Form Default qualified target Namespace hitp 172 21
14. 5 37 5555 mscrmservices 2006 CrmServiceWsdl aspx account List EN Sequence xminsxs http www w3 org 2001 XM LSchema gt m Ba d lt xs import schemalocation MnscrmService 1 account xsd namespace http 172 21 5 37 5555 mscrmmservices 2006 CrmServiceW sdl aspx account gt L accountcategorycode lt xs annotation gt H accountclassificationcode lt xs appinfo gt accountid references xmins http schemas microsoft com BizTalk 2003 gt S accountnumber reference target Namespace hitp 172_21 5 37 5555 mscmmservices 2006 CmmServiceW sdl aspx account gt accountratingcode lt references gt H E address addressid lt xs appinfo gt address1 addresstypecode lt xs annotation gt LIB addesst lt xs element name account List gt i dy xs complex Type S address country lt xs sequence gt t address county lt xs element name count type xs string gt i 5 address fax lt xs element xmlns q1 http 172 21 5 37 5555 mscmservices 2006 CrmService W sdl aspx account ref q1 account gt H address 1_freighttermscode lt xs sequence gt H E address1 latitude lt xs complexType gt E address line1 lt xs element gt address line2 S address line3 02013 R dl Consulting AG Seite 15 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Sample schema for an XRM function CreateOptionSet CreateOptionSet schema xsd X
15. Create an XML message file to create a new record For example contact create xml ns0 accountCustomAction xmlns ns0 http Roedl BizTalk Schemas MSCRM account gt lt nsO account gt lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt ens0 addressl oity Nuremberge ns0 addressl city gt ns0 addressl country gt Germany lt ns0 addressl country lt nsbi ddressl lineloMainstreot le e ns0 address Linel lt nsli ddr ssl postalcode gt 91000 lt neU0raddress postalcode lt nsliaddr ssl telephonelo 49 123456 ns 0 address telephonuel lt ns0 emailaddressl gt JTKRSpace com lt ns0 emailaddressl gt lt nsO name gt James T Kirk lt ns0 name gt lt ne0saccount gt lt ns0 roedlUpsert gt lt ns0 roedlUpsert gt c nsU acocountcustomAcrlion 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 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 lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt n amp l ddressl oityo Nuremberge nsU addressBl Oolty ns0 addressl country gt Germany lt ns0 addressl country ns addressl linelsMainstreet l
16. Retrieve method is used for retrieving a single entity record based on the unique identifier Request Messagetype Response Messagetype 1 Create an orchestration that looks like this Port Surface Kid e Port Surface rpContact MSCRM_ Contact Operation 1 ON E Create Request E Receive 1 3 Request TEES Response spContact Delete Operation 1 Request Request T T N I Response Fetch 3 Request dT Response Retrieve Update 3 Request d 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 gt lt contactid gt 733ef35b 1947 dbll acc2 0050da4615a6 lt contactid gt lt contact gt 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_Retrieve e g C FileDrop Contact Retrieve ln Seite 42 2014 R dl Consulting AG R dl amp Partner 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 Retrieve e g C FileDrop Contact Retrieve Out The content should look something like this lt xml version 1 0 encoding utf 8 gt lt contact xmlns http Roedl BizTalk Schemas MSCRM account lt addressl ad
17. 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 Important Note for Visual Studio A 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 56 2014 R dl Consulting AG MS CRM Adapter for Microsoft BizTalk Supported Functions 28 11 2011 CRM Methods AddltemCampaign AddltemCampaignActivity AddMemberList AddProductToKit 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 ConvertKit ToProduct 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 Can
18. fg telephone I nel FormattedValues d s g accountnumber nslid fe nsliLogcalName g ns1 RelatedEntibes da is 2 Then the fields can be mapped on the key element Demolnput Cre lt 3 Action Type entity Query ns1 Aitributes Create ns1 KeyValuePairOfstringanyType Ge amp LogicalName I8 amp n f f p name value ga websiteur gt ns1 EntityState G3 s telephone 1 ns1 FormattedValues s f accountnumber ns1 ld fi 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 So we have to use a script functoid to convert the values to the appropriated data types zi Create ns 1 Key Value PairOfstringany Type amp sb Logical Name key amp e name value es gt websiteurl ns 1 EntityStat e telephone 1 ns 1 FormattedValue e accountnumber ns1 h ns 1 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 h
19. this ns0 account xmlns ns0 http Roedl BizTalk Schemas MSCRM account gt lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt lt ns0 addressl city gt Nuremberg lt ns0 addressl city lt ns0 addressl country gt Germany lt ns0 addressl country ngD amp 4doressl linel Masinstreet l nsDiaddressl linel lt ns0 addressl postalcode 91000 ns0 addressl postalcode gt ns0 addressl telephonel 49 123456 ns0 addressl telephonel lt ns0O emailaddressl gt JTK Space com lt ns0 emailaddress1 gt ns0 name James T Kirk lt ns0 name gt lt nsO accountid gt c126574a 8ccd e311 93f3 00155dla5a6b lt ns0 accountid gt lt ns0Q account gt 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 Seite 52 2014 R dl Consulting AG R dl amp Partner 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 mes
20. 3 R dl Consulting AG Seite 35 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 gt Roedl Consulting AG lt addressl name gt lt addressl linel gt Laubanger lt addressl linel gt lt addressl line2 gt 23 lt addressl line2 gt lt addressl city gt Bamberg lt addressl city gt lt addressl country gt D lt addressl country gt lt addressl postalcode gt 96052 lt addressl postalcode gt lt account gt The BizTalk Server reads the file and sends the data to the adapter After a short time an XML file will appear in the folder C ICreateAccountiResponse It will be named something like DE15B859 B2AD 4B5D 9A46 5A2CDBE2281C xml 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 ownin
21. 4 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk Introduction Adapter mode of operation The R amp P MS CRM WCF Adapter for MS BizTalk provides a seamless connection between the BizTalk Server and Microsoft Dynamics CRM The adapter must be installed on the BizTalk Server 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 2013 2015 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 2013 2015 provides a WCF interface Unlike earlier versions Microsoft Dynamics CRM 2013 2015 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 THX ra a Solution on WCF Adapter Sample 1 project CF Ad le H i Feie H aj References OrganizationService BindingInfo xml OrganizationService odx al Organizat
22. 43 anyway Configure Adapter Security URI Properties Binding Properties El Connection Organization crm4orgfe 307 Port 56555 Secure Made True Server Mame cmd dynamics com Organization 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 Seite 38 02014 R dl Consulting AG R dl amp Partner 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 like this E ic Filedrop El Contact El Create m in e aut E i Delete ic in EI Gy Fetch aa in ca aut 3 IC Retrieve ca in c aut EI Gy update ca in a out 2 In 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 app
23. BeReferenced CanBeReferencing CanManyToMany DeleteAttribute DeleteEntity DeleteOptionSet DeleteOptionValue InsertOptionValue UpdateOptionValue Disassociate 02013 R dl Consulting AG R dl amp Partner PublishAllXml PublishXml PublishDuplicateRule 1 3 26 ProvisionLanguage 1 3 26 ReassignObjectsOwner ReassignObjectsSystemUser Recalculate RemoveltemCampaign RemoveltemCampaignActivity RemoveMemberList RemoveParent RemovePrivilegeRole RemoveProductFromkit RemoveSolutionComponent 1 3 26 RetrieveDeploymentLicense Type 1 3 26 RetrieveExchangeRate RetrievelnstalledLanguagePacks RetrievelnstalledLanguagePackVersion RetrieveLicenselnfo Retrieve Version SendEmail SendFax oetParentBusinessUnit SetParentSystemUser SetState UninstallSampleData UnlockInvoicePricing UnlockSalesOrderPricing WhoAml WinOpportunity Seite 57 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Contact Roedl Consulting AG L aubanger 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 pro
24. CF 3 Right click on the left Port Surface and choose New Configured Port Ezrek Orchestrator ocs gt lt NN New Port New Configured Port New Role Link Paste Ctrl V Properties Window Zoom k 4 Inthe appearing wizard click wee Port Configuration Wizard Welcome to the Port Configuration 2 Wizard Mee o7 This wizard helps you to configure a part BizTalk Server 2010 In the Orchestration Designer Send and Receive activities connect to Ports so that they can send and receive messages 4 2013 R dl Consulting AG Seite 27 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 settings as they are Click wee 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 fa Create a new Port Type Use an existing Port Type Port Type Mame Communication Pattern fa One Way C Request Response Access Restrictions Private limited to the containing module Internal limited to this project Public no limit Seite 28 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk
25. CRM Adapter for Microsoft BizTalk 1 Create a new orchestration looking like this Port Surface e gt Port Surface Operation 1 a E msg rcount Request em SAT SAA SA B Account Fetch Account to Fetch free eee 0 A a um um MSCRM H msg ccountList Create a Request E p gt 4 Response Create or Update Ps Delete p lt gt Request Create Else J Response Fetch B3 m QUT pin a Request Create Account msg ccodfht pdate pr TE Sa S Response e i ME I a Retrieve i I E i i Request Bsa count Account to Upda i q sp ccount Create LEER SERE esponse Operation 1 Dye Update Request Send Result x4 Hn Request Update Account a Response sp ccount Update Operation 1 fat B Request Update Account Send Result 9 0 Seite 54 2014 R dl Consulting AG R dl amp Partner 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 gt Roedl Consulting AG lt addressl name gt lt addressl linel gt Laubanger
26. False Client Outbound operations Select a category Available categories and operations El E Entities account Microsoft Crm Sdk Types account Eel Misc accountleads Microsoft Crm Sdk Types accountleads E XRM Upamie activitymimeattachm Microsoft Crm Sdk Types activitymimeattachment i CRM Operations b activityparty Microsoft Crm Sdk Types activityparty ET 3 ato a ua nn ono av om a Add Properties Added categories and operations Name Node ID Remove Remove All Filename Prefix Generate unique schema types Cancel E Seite 12 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 7 nthe 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 8 Select the desired entities and functions and add them with the button Bi xt Select a binding Configure a URI 7 Binding E rm vpccm201 Idev1 5555 Roedl2 auth amp ssl False Configure Example xrm vpccrmm2l11rc 5555 Roedl auth Active Directory ssl False Client Outbound operations Select a category Available categories and operations account Microsoft Cmm S
27. Mi salk Server Microsoft Dynamics CRM Microsoft Dynamics CRM 2013 2019 WCF Adapter for Microsoft BizTalk Server 2010 2013 User manual Published on January 2015 2014 R dl Consulting AG All rights reserved R dl amp Partner MS CRM Adapter for Microsoft BizTalk Table of Contents HON 3 Adapter Mode Ol PE AO 3 Why an adapter when Microsoft Dynamics CRM 2013 2015 provides a WCF interface 3 SECUN EE C tT 7 Configuration of the R amp P MS CRM WCF Adapter for MS BizTalk esses 8 EE UO Vs EN Hr TTC SAM VEN 8 Working with the R amp P MS CRM WCF Adapter for MS BizTalk rrrrrrrrrnnnnnnnrvrnnrrrnnnnnnnrvnnnrrnnnnn 9 Working with the adapter in Visual Studio 2010 Designtime ssseeeeeesssssssss 9 Example Call a CRM entity and process the response s ssmmrrressrrrrresrrrrrreorrrrrrenrrrrrenrrrrrrnr rr rr nanna 22 I rereguisites HUFPLUITIG sqousseu ae t dE verdad a seme ap do RN RN dnd d 22 Step 1 Creating the receive port Account cccccccsecccseeeceeeeceeeceeeeseueesaueeseeeeeseeseueesueesaass 23 Step 2 Creating the send port Account nossssssssssssssrrssrrrssrrrrrrrrsrrrn snar rr rrn rr rn rr rr KKR RR RAR KSR RKS Rn 25 Step 3 Creating the schema for Account mnmnssssssssssssssssrsrrerrsr rar rar rar ran rankar ran RAKA KARA RAR KR KORA 26 Step 4 Creating the Orchestration seisis qx peto ns rk ae exis
28. T alkServer pplication hal Send pipeline XMLTransmit Microsoft BizTalk DefaultPip Ej Description i Cancel Apply 3 Select File in the field Transport Type 4 Click Configure FILE Transport Properties xi General Authentication Destination folder iesponse Browse File name MessagelD xmi Copy mode Create New 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 ox 7 Select XMLTransmit in the field Send Pipeline 8 Click OK 02013 R dl Consulting AG Seite 25 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Step 3 Creating the schema for Account 1 Open Microsoft Visual Studio NET 2 Create a new BizTalk project named Roedl MSCRM Adapter 21 xl Netrromework 4 mlsmtbejocout E search instaled Templates O J alk Type BizTalk Projects Visual C amp eg Empty BizTalk Server Project BizTalk Projects i i An empty project for creating a BizTalk Server Projects application Other Project Types GET 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 v Browse Solution Cre
29. a new functionality for much faster development 2013 R dl Consulting AG Seite 19 R dl amp Partner MS CRM Adapter for Microsoft BizTalk WCF Custom Transport Properties Endpoint Address Address URI firm vpcerm201 Tdevl1 5555 Roedl2 auth D LicenzeCode 116018415415 Example ym hosti port path Endpoint Identity Optional the expected service identity SOAP Action header Action BtsAchonMapping mins ssi http aaa arg Zl 2001 AME S chema ns 4 lt Operation Name Create Action Create Operation Name Update ction Update Operation Name Retneve Actianz Hetrneve gt F Single action example http aaa northwindlraders comi S ervice D peration Acton mapping example using BTS Operation property Bts ctiontdapping gt Operation Name Operation1 Action Actionl gt Operation Name Operationk Schon ASctonM Bts ctonkdapping gt cred om toe WCF Custom Transport Properties Ei General Binding Behavior Credentials Messages Import E spart Select binding type and click tree nodes to edit binding configuration Binding Type ermB inding Restore Defaults Binding Configuration OE xm dapterBindingElem E Key name m dapterBinding EI 5tandardBindingE lement claseTimeaut 00 07 00 apenT imenut 00 07 00 recelveTimeout 00 10 00 send Timeout 00 07 00 zmdapterBindingE lement License Code 1704398237321991
30. ate new solution Solution name Roedl MSCRM Adapter v Create directory for solution Add to source control 3 og Solution Roedl MSCRM Adapter 1 project El gaT Roedl MSCRM Adante PIN Ctrl Shift A Shift Alt A Add Reference Add Service Reference View Class Diagram Set as StartUp Project Debug Add Solution to Source Control RoedIMSCRMAc ang BPEL Compliance Project File Unload Project 3 Open Folder in Windows Explorer iz 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 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 Seite 26 02014 R dl Consulting AG R dl amp Partner 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_W
31. 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 gt Roedl Consulting AG lt addressl name gt lt addressl linel gt Laubanger lt addressl linel gt lt addressl line2 gt 23 lt addressl line2 gt lt addressl city gt Bamberg lt addressl city gt lt addressl country gt D lt addressl country gt lt addressl postalcode gt 96052 lt addressl postalcode gt 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 2013 R dl Consulting AG Seite 55 R dl amp Partner MS CRM 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 B
32. bmasRP btm Xx manse f b t 8 R J amp I Options DEBMAS06 aj i Schema FISKN 2 5 account KNRZA fe E i Sequence KONZS 2 3 3 accountcategorycode KTOKD fe accountclassficationcode KUKLA fe accountid LAND 2 tj accountnumber LIFNR fe aecountratingcode LIFSD fe address 1_addressid Locco fe address addresstypecode LOEVM 2 Sep address city NAME amp s address country NAME2 amp 45 address county NAME3 amp 3 address fax NAMES x 3 address 1_freighttermscode NIELS 2 address latitude ORTO amp fg address fine ORTO2 fe 1g address 1_line2 PFACH amp fg address fine3 PSTL2 fe 3 5 address longtude PSTLZ amp fg address1 name REGIO f2 s address postalcode COUNC fe fg address 1_postofficebox CITYC fe tj address primarycontactname RPMKR fe address shippingmethodcode SORTL fe 43 address 1_stateorprovince SPERR f 5 address telephone 1 SPRAS f 4 adress telephone STCD1 fe tj address telephone3 STCD2 fe 43 address upszone STKZA fe address utcoffset STKZU fe address addressid STRAS fe 5 address2 addresstypecode TELBX 2 j address2 city TELF1 fe zl t address2 country TELF2 fe 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 easil
33. ch 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 adapter named xrmBinding appears Because the adapter is based on the Microsoft xRM Framework and provides Microsoft Dynamics CRM 2013 2015 functions as well as Microsoft xRM functions the binding is called xrmBinding 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 Binding Type Restore Defaults Binding Configuration XmAdapterBindingElem E Key name XmAdapterBinding EI Standard BindingHement close Timeout 00 01 00 open Timeout 00 01 00 receive Timeout 00 10 00 send Timeout 00 01 00 E XmAdapterBindingHement targetNamespace xm Roedl Adapters XRN name StandardBindingElement Name Name name Default Value System Object Seite 8 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 int
34. count ii Upsert Request DA Response Receive Account a sp Account Respon Send Account Operation 1 Request EN 16 Create an XML message file to create a new record For example contact create xml ns0 accountCustomAction xmlns ns0 http Roedl BizTalk Schemas MSCRM account gt cnseU0taccounb lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt lt nsliaddressl olty Nuremberge ns addressl city gt ns0 addressl country gt Germany lt ns0 addressl country nsO0raddressl Linel Mainstreet l1 ns0 address lineal ns0 addressl postalcode 91000 ns 0 addressl postalcode nsbi ddressl telephonel o449 1293456 sD0 address telephonel gt lt ns0 emailaddressl gt JTKRSpace com lt ns0 emailaddressl gt lt nsO name gt James T Kirk lt ns0 name gt lt nsdsaccount lt ns0 roedlUpsert gt lt ns0 condition gt accountnumber 123456 lt ns0 condition gt lt ns0 roedlUpsert gt lt ne0 Paccount Cus tomAction gt 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 Account Create In 02013 R dl Consulting AG Seite 51 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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
35. difiedby 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 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 efocontacrhisr 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 02013 R dl Consulting AG Seite 47 R dl amp Partner MS CRM Adapter for Microsoft BizTalk New Upsert and Lookup functionalities The new functionality is running in Microsoft Dynamics CRM 2013 2015 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 lt
36. dk Types account i accountleads Microsoft Crm Sdk Types accountleads H XRM eee activitymimeattachm Microsoft Crm Sdk Types activitymimeattachment fi CRM Operations activityparty Microsoft Crm Sdk Types activityparty al me og 03 70000 IE no mw T atom n Microsoft Crm Sdk Messages Fetch account Microsoft Cm Sdk Types account Remove Remove All Filename Prefix Generate uique schema types Ee 4 9 Click 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 02013 R dl Consulting AG Seite 13 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Solution Explorer Solution Roedl MSCRM WCF Adapter Sample 1 project E Roedl MSCRM WCF Adapter Sample Sa Properties gj References a account schema xsd e Solution Explorer Fi Team Explorer 10 If other files are added you may already use the beta version of the adapter Feel free to delete the unnecessary files 11 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 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 wo
37. dress1 longitude type tns CrmHoat gt t3 address 1_stateorprovince lt xs element minOccurs 0 maxOccurs 1 name address 1_name type xs string gt address1_telephone1 lt xs element minOccurs 0 maxOccurs 1 name address 1_postalcode type xs string gt i address telephone2 lt xs element minOccurs 0 maxOccurs 1 name address 1_postofficebox type xs string gt Ps add are lt xs element minOccurs 0 maxOccurs 1 name address1 primarycontactname type xs string gt i c lt xs element minOccurs 0 maxOccurs 1 name address 1_shippingmethodcode type tns Picklist gt ro address upszone lt xs element minOccurs 0 maxOccurs 1 name address1 stateorprovince type xs string gt eB address utcoffset lt xs element minOccurs 0 maxOccurs 1 name address1 telephone type xs string gt address2 addressid lt xs element minOccurs 0 maxOccurs 1 name address1 telephone type xs string gt H address2 addresstypecode lt xs element minOccurs 0 maxOccurs 1 name address 1_telephone3 type xs string gt S address2 city lt xs element minOccurs 0 maxOccurs 1 name address 1_upszone type xs string gt E j address2 country lt xs element minOccurs 0 maxOccurs 1 name address 1_utcoffset type tns CrmNumber gt address count lt xs element minOccurs 0 maxOccurs 1 name address2 addressid type tns Key gt 21 lt xs element minOccurs 0 maxOccurs
38. dressid gt 607A99B9 AC5A DB11 ACC2 0050DA4615A6 lt 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 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 address2 addressid gt 617A99B9 AC5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt contact gt 5 The CRM system has provided the record with all filled attributes and the data could now be processed in the orchestration 2013 R dl Cons
39. eate 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 lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt ns addressl city gt Nuremb ro lt ns0saddress city ns0 addressl country Germanye ns addressl country ns addressl linel Space Place 1 ns0 addressl linel nesD ad ressl postalcodes91000 nsU0rAddressi postalcode gt ns 0 sdOressl telsphonel 49 1295450 ms0 ddressl telephonel gt lt ns0 emailaddressl gt JTKRSpace com lt ns0 emailaddressl gt lt nsO name gt James T Kirk lt ns0 name gt ns0 accountid c126574a 8ccd e311 93f3 00155d1a5a6b ns0 accountid c ns0 accounto 14 The accounted is the same because there was an update in CRM Seite 50 02014 R dl Consulting AG R dl amp Partner 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 Request Messagetype Response Messagetype accountCustomAction 15 Create an orchestration looking like this Port Surface e Port Surface rp Customer Operation 1 a L srp XRM Request Bj Receive Custo Create F Request 3 _ Response Send_Ac
40. es from WCF LOB Generate Schemas MN CN Consume WCF Service Consume Adapter Service Online Templates 3 Now choose the binding and click Configure Consume Adapter Service jani x Select a binding Configure a URI Configure mini amp t Select contract type Search in category dl amp Select a category Available categories and operations Name Node ID Add Properties Added categories and operations Name Node ID Remove Remove All Filename Prefix Generate unique schema types Cancel y e Seite 10 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 4 Here you can enter the configuration for the Microsoft Dynamics CRM 2013 2015 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 2013 2015 x Security URI Properti ies Binding Properties Client credential type Usemame User name credentials User name domain Llsemame Password mi Client certificate Issued by Expiration Browse Remove 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 authe
41. gbusinessunit 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 modifiedon time 4 19 PM date 03 08 2007 gt 2011 03 08T16 19 24 02 00 lt modifiedon gt 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 lt addressl name gt Roedl Consulting AG lt addressl name gt lt addressl linel gt Laubanger lt addressl linel gt lt addressl line2 gt 23 lt addressl line2 gt lt addressl city gt Bamberg lt addressl city gt lt addressl country gt D lt addressl country gt lt addressl postalcode gt 96052 lt addressl postalcode gt lt address2 addressid gt A81F690E FB22 DBl1 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 Seite 36 Advantage Note that the response
42. ght click on the orchestration Create Account and select Properties 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 new physical port may be created by clicking on the combo bos nest to the logical port name Hast BizT alkServer pplication m Bindings Inbound Logical Ports 93 Receive Ports rpCreate Account Createdccount Outbound Logical Ports 1 Send Ports Send Port Groups erpLreate amp ecaunt WicfSendPort srm dapterBinding Multi spCreate amp ccount Createdccount Lancel Apply 4 As shown in the screenshot above bind the three physical ports to the virtual ports of the orchestration Seite 34 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 5 Connect the orchestration to the host 6 Click OK 7 Start the orchestration Console Root El ra BizTalk Server Administration Orchestration 5 EI 33 BizTalk Group WIN H3772QKHPM EI Applications lt All Artifacts gt ir BizTalk System 1 BizTalk Application 1 EI in MSCRM Adapter Test L Orchestrations Unenlist IE Rale Links Remove G Send Port Groups Move To Application Ea Send Ports Fi Receive Ports Tracking i Receive Locations Policies Resources 8 The BizTalk Server is now ready to execute the orchestration 0201
43. ies Schemas g Maps Mid Dinalinac 3 Enter CreateAccount in the Name field and click Oo F CreateAccount Receive Port Properties Receive Locations nee A Receive Port i container For Receive Locations and contains information regarding Inbound Maps the method of authentication transformations and tracking information Tracking Mame Ereate amp ceount Port type One Way Authentication Specify how messages are handled when using authentication No authentication C Drop messages if authentication fails C Keep messages if authentication Fails Enable routing for failed messages Description g Cancel Apply 4 Right click on the created receive port select New and click Receive Location 2013 R dl Consulting AG Seite 23 R dl amp Partner 5 8 g MS CRM Adapter for Microsoft BizTalk In the following window select File in the field Transport Type 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 alk FileDropsCreate amp ccount Requests xml Receive handler BizT alkServerApplication v Receive pipeline XMLReceive Microsoft BizTalk DefaultPip El IV Make this the primary location Description Cancel Apply
44. ighly 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 Another 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 2013 2015 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 R dl amp Partner MS CRM Adapter for Microsoft BizTalk When using the new adapter a schema of an account may look like this gt account 3 accountcategorycode 3 accountclassificationcode 3 accountid address 1_postofficebox 6 address primarycontactname address shippingmethodcode address stateorprovince y address telephone j address telephone2 address telephone3 y address upszone address utcoffset 4 5 address2 addressid 3 address2 freighttermscode 3 address latitude y address2_line1 9 address2 line j address line3 3 address2_longitude y address2 name address2 postalcode Accordingly the mapping will look like this and not like the mapping created with the original WCF service AccountZDe
45. inActiveRow Version S ns1 MoreRecords 5 ns1 PagingCookie S ns1 TotalRecordCount S ns1 TotalRecordCount Limit Exceeded z CreateResponse 3 CreateResult XOQJ00 ax 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 feler sales e Organizatio so H yie Z DEBMASO6 EI g Schema Schema E E E Create DEBMASO6 El E E entity EDI DC40 f E ns1 Attributes E2KNA1M005GRP E B ns1 KeyValuePairOfstringany Type E1KNAIM E E amp ns5key DATAHEADERREC E ns5 value MSGFN fe 5 nsl EntityState KUNNR fe E ns1 FormattedValues ns1 KeyValuePairOfstringstring ANRED e AUFSD e ns5key BAHNE fe amp ns5 value BAHNS fe 5 ns1 ld BBBNR amp ns1 LogicalName 3
46. ionService Custom BindingInfo xml al OrganizationService schemas datacontract org 2004 07 System Collections Generic xsd ES OrganizationService schemas microsoft com 2003 10 Serialization xsd zl OrganizationService schemas microsoft com 2003 10 Serialization Arrays xsd zl OrganizationService schemas microsoft com am 2011 Contracts xsd zl OrganizationService schemas microsoft com xrm 2011 Contracts xsd zl OrganizationService schemas microsoft com xrm 2011 Contracts Services xsd a OrganizationService schemas microsoft com xrm 2011 Metadata xsd e Solution Explorer Ii Team Explorer 2013 R dl Consulting AG Seite 3 R dl amp Partner 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 ir a d aA 9 G B b Debug OrganizationService ntracts Services xsd X Egg Schema Create 7 8 nsl Attributes H 4 ns1 KeyValuePairOfstringany Type 5 ns5key GF ns5 value S nsl EntityState ns1 FormattedValues B ns1 KeyValuePairOfstringstring 5 ns5 key S ns5 value S nsi ld amp ns1 LogicalName ns1 RelatedEntities 8 4 ns1 KeyValuePairOfRelationship EntityCollectionX_PsK4FkN gt ns5key 5 ns1 PrimaryEntityRole 5 ns1 SchemaName ns5 value 5 nsl Entities nsl Entity S ns1 EntityName 5 ns1 M
47. ive 2 Fetch ON F Request I Respanse E gren Send 2 Retrieve F Request 48 Response Update ES Request 3 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 gt 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 733ef35b 1947 dbll acc2 0050da4615a6 lt contactid gt 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 like this contact xmlns http Roedl BizTalk Schemas MSCRM contact gt 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 733ef35b 1947 dbll acc2 0050da4615a6 lt contactid gt lt contact gt 5 The CRM system has updated the record and provides the same message as response 2013 R dl Consulting AG Seite 41 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Retrieve The
48. izTalk 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 nachine config 2 Navigate to the node configuration Nsystem serviceModel and find the entries XxmAdapter 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 version lt 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
49. izTalkServer CS Create ccount Q Started L BizTalk FileDropsCreat FILE BizTalkServer gt 174 LEM ec ak GA Crark PA DGgT ll Cila raeh Lear CWC DigT I c ee 3 WcfsSendPort XrmAdapterBinding Multiple Custom Send Port Properties c gt p ryert p a Transport Advanced Options rere l Mame wersendPart Xrm dapterBinding Multiple Custom C gt a Backup Transport rene Ee sl Inbound Maps Port type Static Salicit Hespanse T Outbound Maps Transport Filters Select a transport type and transport address below Certificate Tracking od WEF Custom el URI rm tvpeerm2 01 dev 5555 Roedl2 auth D0 amp Licensel Send handler BizT alkServer pplication WCF Custom Transport Properties 5 General Binding Behavior Credentials Messages Import Export User name credentials F Do not use Single Sign On User name domimusemam 000 D Password BORRRRRRPRRSRRRSRSR 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
50. 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 lt cpontact gt lt contact xmlns http crm logisma de mscrmservices 2007 crmservice asmx contact gt contactid D9C68592 AE5A DB11 ACC2 0050DA4615A6 contactid owningbusinessunit C4991D79 06EB DA11 A201 0050DA4615A6 owningbusinessunit 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 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 57402 00 lt createdon gt lt creditonhold name No gt 0 lt creditonhold gt lt createdby name creator dsc 0 gt 4CACBF89 91EC DA11 900D 0050DA4615A6 lt createdby gt amp modifiedon time 1 32 PM dat 03 09 2011 gt 2011 03 08713 32 57 02 00 lt modifiedon gt lt modifiedby name modifier dsc 0 gt 4CACBF89 91EC DA11 900D 0050DA4615A6 lt mo
51. lt addressl linel gt lt addressl line2 gt 23 lt addressl line2 gt lt addressl city gt Bamberg lt addressl city gt lt addressl country gt D lt addressl country gt 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 Copy the file into the input folder of the receive port account Create e g C FileDrop Account Createlln 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 gt Roedl Consulting AG lt addressl name gt lt addressl linel gt Laubanger lt addressl linel gt lt addressl line2 gt 23 lt addressl line2 gt lt addressl city gt Bamberg lt addressl city gt lt addressl country gt D lt addressl country gt lt addressl postalcode gt 96052 lt addressl postalcode gt lt accountid gt 733ef 35b 1947 db11 acc2 0050da4615a6 lt accountid gt lt account gt 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
52. lt lastname gt lt mobilephone gt 49 171 123456 lt mobilephone gt lt contact gt Attention Take care of the namespace It has to be the same as given in the schema 3 Copy the file into the input folder of the receive port Contact Create e g C FileDrop Contact Create In 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 gt contact xmlns http Roedl BizTalk Schemas MSCRM contact gt 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 dbll acc2 0050da4615a6 lt contactid gt J contact gt 5 The CRM system has created the record and provides the contactid This can be processed directly in the orchestration Seite 40 2014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk Update The method Update is used for updating entity records Request Messagetype Response Messagetype Contact Contact 1 Create an orchestration looking like this Port Surface e Port Surface rpcanbtactE MSCRM_ Contact Operation 1 se Ee Create Request BS Receive 1 3 Request 48 Response E spContact SEMI NN Delete Operation 1 3 Request Request T 48 Response i Rece
53. message contains all attributes of the entity even the attributes provided in the request message You can directly continue to work with this data 2014 R dl Consulting AG R dl amp Partner 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 Usemarne al User name credentials User name WOUmameRiiourdormaln com Password G Client certificate lssued by E spiration Cancel 02013 R dl Consulting AG Seite 37 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 4
54. nas0 sddre asl Irnel ns raddressl postalcode 91000 nsUtBddressl postalcode nsU ad ressl telephonel 49 I29456 ns 0iaddressl relephonsel lt ns0 emailaddressl gt JTKRSpace com lt ns0 emailaddressl gt ns0 name James T Kirk lt ns0 name gt ns0 accountid c126574a 8ccd e311 93f3 00155d1a5a6b ns0 accountid ns tacoounto 02013 R dl Consulting AG oeite 49 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 enesUfaccoun lt ns0 accountnumber gt 123456 lt ns0 accountnumber gt lt neliaddr ssl citvsNuremberg nsUraddressl citys ns0 addressl country gt Germany lt ns0 addressl country nsUsaddressl linelsS5paoce Place l e nsDraddressl Iinel ns0rmudressl postaloods291000 ns rtaddress l postalocode ns raddressl telephonelo449 123456 lt msU address telephonel lt ns0 emailaddressl gt JTKRSpace com lt ns0 emailaddressl gt lt nsO name gt James T Kirk lt ns0 name gt jsns saccount gt lt ns0 roedlUpsert gt lt ns0 condition gt accountnumber 123456 lt ns0 condition gt lt ns0 roedlUpsert gt lt ns0 accountCustomAction gt 12 Copy the file into the input folder of the receive port Account Cr
55. ntication Furthermore the organization the port transport security http or https and the server name have to be entered Configure Adapter Ea Security UAI Properties Binding Properties EI Connection Organization crmdorgfe 307 Fort 5555 Secure Mode True Server Mame crm A dynamics com Cancel 02013 R dl Consulting AG Seite 11 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 Configure Adapter X ies Binding Properties Close Timeout Mame Open Timeout Receive Timeout Send Timeout LicenseCode License Name mes 6 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 By clicking come the adapter authenticates against Microsoft Dynamics CRM 2013 2015 collects some further information from the system and finally provides you a set of categories to work with Jo Select a binding Configure a URI Configure fam Binding Ln am vpecm201 dev 1 5555 RHoedl2 auth amp ssl False Example xrm vpccmm201 1rc 5555 Roedl auth Active Directory ssl
56. ntity and process the response Seite 22 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 2013 2015 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 CA BizTalk Filedrop CreateAccount Hequest Hesponse We will need the following informations of the CRM system o URL o Login credentials o Proxy if necessary 02014 R dl Consulting AG 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 ER BizTalk Server Administration Console File Action View Help 4 up 7 7 Console Root EI sf BizTalk Server Administration E 43 BizTalk Group WIN H3772QKHPM 3 i Applications lt All Artifacts gt be BizTalk System EI E BizTalk Application 1 Fe Orchestrations Hs Send Port Groups Ed Send Ports a Receive Ports Eal Polic
57. o two workspaces On the one hand send ports will be defined that are physically linked with the adapter We call this workspace Runtime Customization 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 2010 Designtime 1 To start the adapter wizard right click on your project and select Add and Add Generated Items Bele og Solution R E i 3 Build Rebuild Deploy Clean New Item Cirl Shift A si Existing Item Shift FAlt A Add Reference New Folder Add Adapter Service Reference Pile OL Ib Io Add Service Reference ay View Class Diagram Set as StartUp Project d Sol Debug I FE Add Solution to Source Control cut Ctrl X EE B TB Paste Ctrl V BPEL X Remove Del Rename Unload Project Open Folder in Windows Explorer 2 Properties Alt HEnter 2013 R dl Consulting AG Seite 9 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 2 Inthe following screen select Consume Adapter Service and click Add Add Generated Items Roedl MSCRM WCF Adapter Sample 21 xl Installed Templates Sort by Default E E Search Installed Templates p Generated Schema Files T Type Generated Schema Files Add Adapter Metadata Consume Adapter Service Generated Schema Files Create schema XSD fil
58. ort Surface MSCRM WCF Receive Account Create NEN mu D Bsponse 8 Delete Send Account P a Request 4 Response i m tn Tw P 2 RT xecute Receive Account p F Request a TY 49 Response a Send Account Fe Em A Request r Response Retrieve J Request L 48 Response Update a Request Response 18 Now the message for the orchestration will be created Orchestration view Create Account Be orchestration Properties A Orchestration Parameters H A Ports G A Messages i a msg ccount Properties msg ccount Message EH Description Identifier msg ccournt 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 them with the logical ports After that your orchestration should look like this Seite 32 02014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk Create Accounk adx XX Port Surface ra gt Port Surface ott Pet aet a MSCRM WCF rporeate Account Hr ERES Mr 28 7171717171 2474212171 7124021287171 USSU 737123 7178 71221217128 r kn 7471 717428217121 12128 12121 7128 717471 2171 824028210771 71 188 17123 7123 34211 Operation 1 Request Create Request Hj Response fee SEESEESES h
59. prietary interest in trademarks and trade names other than its own oeite 58 02014 R dl Consulting AG
60. rd List For example by generating the schemas for the entity Account a XSD file named entity Account xsd containing the schemas Account and AccountList will be created The collection schema will be needed for the Fetch response of the several entities aN Seite 14 2014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk Sample schema for an entity Account HE mscrmService 1 account xsd X 2 E A Sequence a S H accountcategorycode lt 2xml version 1 0 encoding utf 16 gt H accountclassificationcode xs schema xmins b http schemas microsoft com Biz Talk 2003 xmins tns http 172 21 5 37 5555 mscrmse EB accountid target Namespace http 172 21 5 37 5555 mscrmservices 2006 CrmServiceW sdl aspx account xmins xs h m l accountnumber lt xs complex Type name BusinessEntity abstract true gt ae trati j xs complexType ARD TE xs complexContent mixed gt H E address addressid xs extension base tns BusinessEntity gt H address addresstypecode xs sequence gt i address city lt xs element minOccurs 0 maxOccurs 1 name accountcategorycode type tns Picklist gt t address 1_country lt xs element minOccurs 0 maxOccurs 1 name accountclassificationcode type tns Picklist gt S address county lt xs element minOccurs 0 maxOccurs 1 name accountid type tns Key gt l address1 fax lt xs element minOccurs
61. ropriate physical ports and confirm with OK Port Binding Properties MSCRM Adapter Test Contact Create Configurations Binding 53 Configurations El Inbound Ports Binding rpoontract Create Contact Create Hast El Outbound Ports Static MSCRM_ Contact MSCRM spContact Create Contact Create rpContract Create Refers to a port through which the Orchestration receives data From an external entity Specify a Receive Port Cancel Apply Help 5 Repeat Step 3 and 4 with the orchestrations Delete Contact Fetch Contact Retrieve Contact and Update Contact 2013 R dl Consulting AG Seite 39 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Create The Create method is used to create entity records Request Messagetype Response Messagetype Contact 1 Create an orchestration looking like this Port Surface Port Surface rp ccaunt CRM Operation 1 on hs Create Request BE Receive 1 m Request TA Response Delete Send 1 3 Request I Response Receive 2 Fetch 3 Request sp ccaunt Sm a R esponse Operation 1 FSE a bg Request sp Retrieve 3 Request 4 Response Update 3 Request 48 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 gt lt firstname gt Jim lt firstname gt lt fullname gt Jim T lt fullname gt lt lastname gt Kirk
62. sage 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 lt nsO entity name account lt nsO all attributes lt nsO filter type and gt lt nsO condition attribute accountnumber operator eq value 4711 gt nS0sTilcver gt lt nsO entity gt ns0 fetch The response message will be a message of type AccountList In the subsequent Decide shape you will have to evaluate the value of the element count count value Consequence i created Ad 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 o5ystem Convert Tolnt32 msgAccountList count 0 In the 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 2013 R dl Consulting AG Seite 53 R dl amp Partner MS
63. sponse The contactid is not contained because the record with this unique identifier doesn t exist anymore 2013 R dl Consulting AG Seite 45 R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 e Port Surface rpContact Fetch i MSCRM Contact p Operation 1 oe Ee Create Request BS Receive 1 3 Request 4 Response OS m spContact_List CM Delete end Operation 1 33 Request Request ES x I Response es m Receive z Fetch F Request e H ig Response Send 2 Retrieve e 3 Request d Response Update 3 Request d Response 2 Create an XML message file to search for one or more records For example contact fetch 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 SeITIlQO8r 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 A 3 Copy the file into the input folder of the receive port Contact Fetch e g C FileDrop Contact Fetch In Seite 46 02014 R dl Consulting AG
64. t xs complexType gt lt xs complexType name Label gt lt xs sequence gt lt xs element maxOccurs unbounded name LocalizedL abels type nsO0 LocalizedLabel gt lt xs element name UserLocalizedLabel type ns LocalizedL abel gt lt xs sequence gt m Sample schema for a CRM function ConvertQuoteToSalesOrder ConvertQuoteToSalesOrder schema xsd X E 2 ConvertQuoteT oS alesOrder lt xml version 1 0 encoding utf 16 S Quoteld lt xs schema xmins b http schemas microsoft com BizT alk 2003 xmins ns0 Microsoft Crm Sdk Messages ConvertQuoteT oS alesOrder elementFormDefaul A ColumnSet targetNamespace Microsoft Crm Sdk Messages ConvertQuoteToSalesOrder version 1 0 mlns sz http www w3_org 2001 XMLSchema gt 18 AllColumns lt xs annotation gt S Columns lt xs appinfo gt lt fileN ameHint mlnsz http 77schemas microsoft com servicemodel adapters metadata xsd ConvertQuoteT oS ales rder schema fileN ameHint gt E 3 ConvertQuoteT oS alesOrderResponse lt xs appinfo gt E a Entity lt xs annotation gt y LogicalN ame lt xs element name ConvertQuoteT oS ales rder S Id lt xs annotation gt Attributes lt xs documentation gt lt doc action 3 icis NN mlns doc http 77schemas microsoft com servicemodel adapters metadata documentation Microsoft Crm S dk Messages ConvertQuoteT oS i lt xs documentation gt RelatedEnti
65. te seas 27 Step 5 Set up the orchestration in the BizTalk Server Administration Console 34 Step 6 Testing the Orchestration c ccccscsseeceecccsseecensceseeceeccceeseeeesscceeseeessceserecessceeeeeesses 36 Gorineectbg to CRM ONIME esccuu kon eese siuia eese a e 37 FUNNET s CURSO AS 39 c m 40 UPA 41 KEENE RE EE SEK ANANAS SENASTE LANSEN 42 Bc M 44 ge tc 46 New Upsert and Lookup functionalities mssmmsmssssrssessrrrressrrrrresrrrrrenrrrrrrrrrrrrrrr rar rr rn r rr rr rer RR Kran RR Rn nan nn 48 Berl sak cess NE 49 LOOKUP TUNCHONAIY NT NE NE 51 MPOT AC COUN PET PIT 53 WCF XRM Adapter Installation under 64 Bit rrrrrnrnnnrrrorrrnnnnnvrnvrnnnnnrrnnrnnnnnrrnnnnnnenrennnnnnnnsnn 56 BACK GOI MM E Troop 56 Manual Registration Instruction cccccccccccseeeeeeeeeeeeeseeseeeeseeeeeeseaseeesseeeeeeseeesessueeeessaeeeessaneees 56 Paste to the 64 bit machine configuration messmessssrrssssresrrrrersrresrrrrnrrrrrn rr nns rr rn rr rr nr rr rn RR KR RR rr enn nn 56 Supported Functions 28 11 2011 onsmsssssssssrressssrreesssrerenrrrrreosrrrrrrnrrrrrrrr rr rr rens rr rr nr RR RKA RR RR RR nn 57 GE Ms g 910 SE EE EE JE ee eee ee ee ee 57 FU VERONA 57 Seite 2 0201
66. this lt xml version 1 0 encoding utf 8 gt contact xmlns http Roedl BizTalk Schemas MSCRM account lt addressl addressid gt 607A99B9 AC5A DB11 ACC2 0050DA4615A6 lt 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 0050DA4615A6 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 lt modifiedby dsc 0 name modifier gt CD8E9A9A 9D44 DB11 ACC2 0050DA4615A6 lt modifiedby gt lt lastname gt Kirk lt lastname gt address2 addressid gt 617A99B9 AC5A DB11 ACC2 0050DA4615A6 lt address2 addressid gt lt participatesinworkflow name No gt 0 lt participatesinworkflow gt lt contact gt 5 The CRM system has deleted the record and provides the complete record data as re
67. ties lt xs annotation gt lt xs complexT ype amm rmm AS E A Seite 16 2014 R dl Consulting AG R dl amp Partner MS CRM Adapter for Microsoft BizTalk 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 rr ER MSCRM Adapter Sample Console Root E lf BizTalk Server Administration EI 33 BizTalk Group BT2010 BizTalkMgmtDb jj Applications Og lt AllArtifacts gt FE Orchestrations hr BizTalk System Ba Ade Links iti BizTalk Application 1 i iii BizTalk EDI Application O Send Port Groups El i MSCRM Adapter Sample al Send Ports Orchestrations Start FI Role Links Stop Sn J Send Port Groups Configure ceive Locations 14 Send Ports SH ET Receive Ports Export Bindings Receive Locations add Eal Policies a Schemas Delete E Maps Refresh id Pipelines Properties EN Resnurces ur Parties Help EE Platform Settings FI Event Viewer Local 3 A file selection window appears 2013 R dl Consulting AG Seite 17 R dl amp Partner Seite 18 MS CRM Adapter for Microsoft BizTalk Projects Roedl MSCRM Adapter Roedl MSCRM Adapter Organize New folder de
68. ulting AG Seite 43 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Delete The Delete method is used for deleting an entity record based on the unique identifier Request Messagetype Response Messagetype 1 Create an orchestration looking like this Port Surface lt lt e Port Surface rpContact Delete MSCRM Contact Operation 1 MEN EC Create Request BS Receive 1 3 Request d Response ce MR Delete J FI Request ee Response m Receive 2 Fetch spContact Delete 3 Request Operation 1 b R 48 Response Request Maa d Send 1 Retrieve 3 Request en Response Update Request d 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 gt lt contactid gt 733ef35b 1947 dbll acc2 0050da4615a6 lt contactid gt lt conktaot gt 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 Seite 44 02014 R dl Consulting AG R dl amp Partner 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 Delete e g C FileDrop Contact Delete Out The content should look something like
69. xs complexType gt S LanguageCode lt xs element gt S IsManaged lt xs element name CreateOptionSetResponse gt IsCustomOptionSet lt xs annotation gt 3 IsGlobal lt xs documentation gt S IsManaged doc action 4 IsCustomizable xmlns doc http schemas microsoft com servicemodel adapters metadata documentation gt Microsoft Xrm S dk Messages Create ptionS et response lt doc action 7 lt xs documentation gt j Value f lt xs annotation gt IS CanBeChanged lt xs complexType gt ManagedPropertyLogicalName lt xs sequence gt Name lt xs element name OptionSetld type ns0 Guid gt S OptionSetType lt xs sequence gt Cj Metadatald lt xs complexT ype gt ram lt xs element gt 3 pk lt xs complexType name OptionSetMetadataBase gt amp j OptionSetld ORT ipae ion type ns0 ie E ption type ns Label gt lt xs element name DisplayN ame type ns Label gt lt xs element minOccurs 0 name IsCustomOptionSet type xs boolean gt lt xs element minOccurs 0 name IsGlobal type xs boolean gt lt xs element minOccurs 0 name IsManaged type xs boolean gt lt xs element name IsCustomizable type ns BooleanM anagedProperty gt lt xs element name Name type xs string gt lt xs element minOccurs 0 name OptionSetType type ns0 OptionSetType gt lt xs element minOccurs 0 name Metadatald type ns0 Guid gt lt xs sequence gt l
70. y add the schemas to your project in Visual Studio in the same way as you have 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 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Example Account Schema for Request X Schema for Response Insert account jaccount Update account sf account Delete account Jaccount _ ___ _ _ Retrieve accout Jaccount Fetch fetch Jaccountlist accountCustomAction account Security The R amp P MS CRM WCF Adapter for MS BizTalk communicates directly with the original Microsoft Dynamics CRM 2013 2015 WCF service interface The same security rules take effect as if you were working with the WCF service itself 2013 R dl Consulting AG Seite 7 R dl amp Partner MS CRM Adapter for Microsoft BizTalk Configuration of the R amp P MS CRM WCF Adapter for MS BizTalk Installation With the distribution of the adapter you will receive an executable installation file You can choose between the 32bit and the 64bit installation whi
Download Pdf Manuals
Related Search
Related Contents
Accessories user manual Issue 09 Emerson 24000SB Instruction Manual 取扱説明書 - デンソーウェーブ FieldServer FS-8700-21 Computer Drive User Manual LaTeX - University of Michigan スライドハンマプラーねじサイズ変換アダプター取扱説明書 Stoves 600CGH MK2 Megôhmetro Digital de 12kV Comprehensive user manual(V1.0) ( mark for special model Copyright © All rights reserved.
Failed to retrieve file