How to get Advanced Find FetchXml Query in Dynamics CRM
For one of my applications , I needed to get the all the records,found in AdvancedFind and manage these records.
If the record count is less than max display number of grid view ,there is no problem.
Here is the solution in one of my old posts.
What if the the records are more than this number ?
var sUrl = '/ISV/YourPage.aspx';
var sWin = window.open(sUrl,'','height=650,width=750,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,modal=yes');
And now , you need to create a custom aspx page to handle the events and FetchXml Query.
1-Create an aspx page.
2-Add an asp:textbox or asp:hiddenfield named "crmAdvFindFetchXml" to your page.
4-Add an asp:button to your page and create a post back button click event for the button.
5- Copy and paste the code below in the asp:button click event.
CrmService crmService=new CrmService();
init your CrmService regarding your crm instance
XmlDocument xmlDoc = new XmlDocument();
foreach (XmlNode item in xmlNodes)
if (item["accountid"] != null)
/* accountid is just for example ,it can be any fieldid which is retrieved in fetchxml for your needs */
Revision number 1, Saturday, February 06, 2010 1:07:48 PM by Erhan Akova
This is not the most up to date version of this article. The most recent version can be found here.
You must Login to comment.