Project DescriptionFetch XML fluent JavaScript Library for Microsoft CRM 4
This project originated out of my frustration when dealing with Fetch XML in JavaScript. The Fluent Fetch XML library provides a easier way of creating Fetch XML in an object oriented manner. The library uses the chaining to achieve fluent markup.
Usage Samplevar test = new fluentFetchXml();
test.count('5')
.entityName('sdas')
.attribute('abc')
.attribute('pqr')
.order('sdsd',true)
.condition('name','eq','asa')
.filter('or')
.condition('name','eq','asa1')
.condition('name','eq','asa1')
.getFetchXml();
Output<fetch mapping="logical" count="5" version="1.0">
<entity name="sdas">
<attribute name="abc" />
<attribute name="pqr" />
<order attribute="sdsd" descending="true" />
<filter type="and">
<condition attribute="name" operator="eq" value="asa" />
<filter type="or">
<condition attribute="name" operator="eq" value="asa1" />
<condition attribute="name" operator="eq" value="asa1" />
</filter>
</filter>
</entity>
</fetch>
All the Fetch XML constructs are not supported at the moment.