It is a Light weight windows application and this tool will be helpful when you are extensively working with FetchXML in Javascript / C# code to get desired result.
Functionality:
It will take FetchXML from Advance Find as an input and convert that into desired format, which can be used into Javascript / C# for further coding.
Pros:
- No Need to spend time for FetchXML formatting
- It is easy to use.
- Works for both Javascript and C# code
Example:
Let us take a simple example of the below FetchXML,
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="contact"> <attribute name="fullname" /> <attribute name="telephone1" /> <attribute name="emailaddress1" /> <attribute name="contactid" /> <order attribute="fullname" descending="false" /> <filter type="and"> <condition attribute="ownerid" operator="eq-userid" /> <condition attribute="statecode" operator="eq" value="0" /> </filter> </entity> </fetch>
Provide this as an input to FetchXML formatter Tool, 1. Check Javascript radio button and click on Format to see the below output,
"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+ " <entity name='contact'>"+ " <attribute name='fullname' />"+ " <attribute name='telephone1' />"+ " <attribute name='emailaddress1' />"+ " <attribute name='contactid' />"+ " <order attribute='fullname' descending='false' />"+ " <filter type='and'>"+ " <condition attribute='ownerid' operator='eq-userid' />"+ " <condition attribute='statecode' operator='eq' value='0' />"+ " </filter>"+ " </entity>"+ "</fetch>"
2. Check C# radio button and click on Format to see the below output,
@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='contact'> <attribute name='fullname' /> <attribute name='telephone1' /> <attribute name='emailaddress1' /> <attribute name='contactid' /> <order attribute='fullname' descending='false' /> <filter type='and'> <condition attribute='ownerid' operator='eq-userid' /> <condition attribute='statecode' operator='eq' value='0' /> </filter> </entity> </fetch>"
Click Here to download the FetchXML Formatter Tool Exe file
Screen Shots:
Reblogged this on Dinesh Ram Kali..
LikeLike
This is really helpful tool, saves our time in formatting fetch xml as required. Most of the times we end up with an error by missing opening or closing quotes.
LikeLike
Nice one Arun, Hope to see similar useful stuffs.
LikeLike
Thank you Himanshu 🙂
LikeLike
Hi Arun,
I want to create fetchxml similar to below SQL query:
select AccountName from Account where AccountName not in (select AccountName from Application where ProgramElement = “ABC”)
Any help will much appreciated.
Thanks,
Faisal
LikeLike
Hi Faisal,
Query what ever you have provided is not possible in single FetchXML.
Required 2 FetchXMLs to retrieve the data.
Thanks.
LikeLike
Hi Arun,
Can you please provide some examples how to create two FetchXMLs to meet this requirement.
Thanks,
Faisal
LikeLike
This is quite possible using one query only.
I used FetchXML Builder to compose this query:
Note: attribute names were assumed from your question, may need to be corrected.
FetchXML Builder can be downloaded free at http://fxb.xrmtoolbox.com
LikeLike
It seems the comment field does not allow xml, perhaps this works better…
<fetch count=”50″>
<entity name=”account”>
<attribute name=”name” />
<filter>
<condition entityname=”appl” attribute=”accountname” operator=”null” />
</filter>
<link-entity name=”application” from=”accountname” to=”accountname” link-type=”outer” alias=”appl”>
<filter>
<condition attribute=”programelement” operator=”eq” value=”ABC” />
</filter>
</link-entity>
</entity>
</fetch>
LikeLike
Reblogged this on Nishant Rana's Weblog.
LikeLike
[…] FetchXML Formatter Tool. […]
LikeLike
Reblogged this on CRM 2015 – Sreeni Pavalla's Dynamic CRM Blog.
LikeLike
Reblogged this on sabihahmedkhanblog.
LikeLike
[…] To Know more about FetchXML Formatter Tool click Here […]
LikeLike
Thanks meant for giving this sort of wonderful written content
LikeLike
Thank you 🙂
LikeLike
Howdy, awesome webpage you possess at this time there
LikeLike
Hi all,
I tried creating similar in javascript, Please check it out
http://codepen.io/AshishVishwakarma/full/RoVRWO/
LikeLike
Fantastic Ashish. Good Work.
LikeLike
Thanks Arun 🙂
LikeLike