Hi Yadnyesh,
Thanks for your answer it works well. I have another query is it possible to nest fetchxml together like in this fetchxml I get the data :
<fetch version="1.0" mapping="logical" >
<entity name="jgs_leadcourse" >
<attribute name="jgs_name" />
<attribute name="createdon" />
<filter type="and" >
<condition attribute="statecode" operator="eq" value="0" />
</filter>
<attribute name="jgs_leadid" />
<attribute name="jgs_assignedtoid" />
<attribute name="jgs_assignedon" />
<attribute name="jgs_sourceid" />
<attribute name="jgs_ishighlyrated" />
<attribute name="jgs_leadcourseid" />
<attribute name="jgs_approvalstatus" />
<attribute name="jgs_approvaldiscount" />
<order attribute="createdon" descending="true" />
</entity>
</fetch>
and this is xml defining the data-definition on the visualization of a chart which i have fetched using visualization-id :
<datadefinition>
<fetchcollection>
<fetch mapping="logical" aggregate="true" >
<entity name="jgs_leadcourse" >
<attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_14" name="modifiedon" dategrouping="week" />
<attribute alias="_CRMAutoGen_aggregate_column_Num_15" name="jgs_name" aggregate="count" />
<attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_16" name="jgs_approvalstatus" />
</entity>
</fetch>
</fetchcollection>
<categorycollection>
<category alias="_CRMAutoGen_groupby_column_Num_14" >
<measurecollection>
<measure alias="_CRMAutoGen_aggregate_column_Num_15" />
</measurecollection>
</category>
</categorycollection>
</datadefinition>
i am trying to put them together, any suggestions.
Thanks.