biztalk 2006 r2 - crm 2011 - retrievemultiple


  • First step is almost done , get data out of crm and send to biztalk to forward to other systems...using plugin....

    Next step ....I want to select data from crm2011 (data from several related entities) , data I need to add to data coming from another system......

    I know I can go for sql-selecting on filtered views or query crm using the wcf-service.

    Now I've chosen the second one (after a lot of googling looks to be the best practice to do this?).

    now, I'm a bit confused , there are only 2 ways to get related data out of crm it seems and thats using fetchxml and retrievemultiple. That's usually what you find for crm 4.0, but is this valid for crm 2011 as well?

    In crm2011 is it possible to use fetchxml as well? Can I put a fetchxml-string in the fetchexpression ?

    (to get 'quickstarted' I would build my query in crm2011 using advanced query and then saving the fetchxml...lazy I know :-)

    Can anyone point me to an example on extracting data using the retrievemultiple-schema from within biztalk

    (using fetchxml if possible and/or using a queryexpression) 

    Kind regards Isabelledc

    Wednesday, February 08, 2012 10:22 AM


All replies

  • Hi,

    To learn more of the BizTalk capabilties with CRM2011, see:

    All this information is target for BizTalk 2010 and it may be applicable for 2006 R2.


    Steef-Jan Wiggers

    MVP & MCTS BizTalk Server 2010 | @SteefJan

    If this answers your question please mark it accordingly


    Wednesday, February 08, 2012 10:54 AM
  • Very interesting links....we are in exactly such a scenario, glad to see we did it the same way(almost)

    Waiting for the rest of the story!

    Meanwhile I'm struggling to 'map' a retrievemultiple-query - queryexpression ....

    (not the fetchxml)

    I can't seem to make the simplest query work. A retrieve works so it's not the connection....

    Any links/information on that?

    Kind regards Isabelledc

    Thursday, February 09, 2012 2:54 PM
  • Good List by Steef-Jan!

    Reg the retrievemultiple, I have found some threads, Please refer them here and here, Might be helpful

    HTH,Naushad (MCC/MCTS),My New Technet Wiki Article “BizTalk Server: Performance Tuning & Optimization"

    If this is helpful or answers your question - please mark accordingly! Please "Vote As Helpful" if this was useful while resolving your question!

    Sunday, March 04, 2012 1:41 PM
  • Well, I have been able to make the retrievemultiple work .....for some part  (two levels deep....)

    But what I needed were linked entity's and within these again linked entities...of those several levels get some fields,

    some needed conditions , some only needed to be joined...

    If you try and do this using the mapper ..... well , let's say I don't think you should use the mapper for something like this..

    (I actually only had one value  from the incoming message ,that I need to do the selection, everything else is fixed)

    So, I've turned to the sql-adapter and using a SP to select from the filtered views.... for something like this it feels more natural...

    The system to interface with crm2011 is mainly built to be used from code , not from biztalk using the biztalk-tools , that's my feeling.....

    you can , but it's ugly , not nice to see or do.....

    Kind regards Isabelledc

    Tuesday, March 06, 2012 8:00 AM
  • In my experience and on the blogs I have seen on BizTalk/CRM 2011, using the mapper can be far too complicated with the CRM 2011 formats and in some cases even with CRM 4. So I end up using Linq to Xml because this makes it a lot easier to do searches of the Xml. From BizTalk you could call the CRM web services and then process the files using a .NET method.

    There are of course some disadvantages of querying CRM directly through the database.



    If this answers your question, please use the "Answer" button to say so | Ben Cline

    Wednesday, March 07, 2012 5:27 AM