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: