Hi,
I need to retrieve the underlying xml for a view for which i have the view-id.
Can i get a suggestion as to how this can be implemented.
Thanks.
*This post is locked for comments
Hi,
I need to retrieve the underlying xml for a view for which i have the view-id.
Can i get a suggestion as to how this can be implemented.
Thanks.
*This post is locked for comments
Hi Prakash,
I have never worked on XML of chart's visualization. Though I research a bit about it, please check if below link if helpful to you.
crmchartguy.wordpress.com/.../crm-chart-xml
Thanks & Regards,
Yadnyesh Kuvalekar
Kindly tick verify answer if this resolves your query.
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.
You can use this managed solution: https://viewfetchxml.codeplex.com to easy view fetchxml in the advanced find.
Hi Prakash,
Using C# code, you can fetch view's XML as per below:
string fetchQuery = @"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='savedquery'> <attribute name='name' /> <attribute name='fetchxml' /> <attribute name='layoutxml' /> <attribute name='savedqueryid' /> <order attribute='name' descending='false' /> <filter type='and'> <condition attribute='savedqueryid' operator='eq' value='<your view id>' /> </filter> </entity> </fetch>"; EntityCollection eb = _OrgService.RetrieveMultiple(new FetchExpression(fetchQuery));
In FetchXml and LayoutXml fields, you can get Xml.
Also, FYI, you can use Download FetchXml option to download xml of a view from advance find window. Below is the screenshot.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156