Home

Jul 20, 2009

FetchXml Builder Tool

Friends,

Here is very nice to tool to develop the fetchXml in CRM 4.0. You can add this tool to your CRM arsenals.

I have developed complex fetchXml using James tool in which fetch xml retrieves attributes from multiple entities.

In below example "address1_name", "address1_latitude" are from Contact and "accountnumber" is from Account.

<fetch mapping='logical'>
<
entity name='contact'>
<
attribute name='address1_name'/>
<
attribute name='address1_latitude'/>
<
link-entity name='account' from='accountid' to='accountid' link-type='natural'>
<
attribute name='accountnumber'/>
<
attribute name='accountid'/>
</
link-entity>
</
entity>
</
fetch>

3 comments:

Asha05 said...

Can you explain in detail where to call the above code and how to execute the above query and where can i get the data ?

Asha05 said...

Can you explain where to call above codes and how and where will the data value of the field i will get... ?

Amol Gholap said...

If you are using CRM 2011, there is a method ExecuteFetchXml. You can use it there.