{"id":2603,"date":"2021-02-19T11:37:06","date_gmt":"2021-02-19T06:07:06","guid":{"rendered":"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/"},"modified":"2021-08-13T18:11:58","modified_gmt":"2021-08-13T12:41:58","slug":"how-to-create-and-save-fetchxmlquery-from-dynamics-365","status":"publish","type":"post","link":"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/","title":{"rendered":"How to Create and Save FetchXmlQuery from Dynamics 365"},"content":{"rendered":"<div style=\"text-align: justify;\">\n<p>In Dynamics 365 WebAPI, you can retrieve data using FetchXML queries for some complex requirements. Dynamics 365 WebAPI supports querying using \u201cFetchXML\u201d. With FetchXML, it can be easily generated using \u201cAdvanced Find\u201d.<\/p>\n<p>Advanced Find is a powerful feature in Dynamics 365 that can be used easily by literally any user without SQL query knowledge. It is specifically helpful when there is a need to narrow down results to the minimum, based on the &#8216;specified filter\u2019 criteria.<\/p>\n<p>You need to follow the below steps to general FetchXML queries using \u2018Advanced Find\u2019:<\/p>\n<h2>Step-1: Search and open \u201cAdvanced Find\u201d<\/h2>\n<p>\u2192 To access \u2018Advanced Find\u2019 in Dynamics 365, click on the \u2018funnel\u2019 icon in the upper right-hand corner.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Advanced-Find.png\" alt=\"Advanced Find\" \/><\/p>\n<p>\u2192 By clicking on the \u2018funnel\u2019 icon, the \u201cAdvanced Find\u201d window will open.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Advanced-Find-funnel.png\" alt=\"Advanced Find funnel\" \/><\/p>\n<p>\u2192 In the Look for drop-down option, select an entity for which you want to generate a FetchXML Query.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Look-for-drop-down-option.png\" alt=\"Look for drop-down option\" \/><\/p>\n<p>\u2192 Click Select to define search criteria. Fill in the criteria. (You can select fields from the current record type, or from related records.)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Select-to-define-search-criteria.png\" alt=\"Select to define search criteria\" \/><\/p>\n<p>\u2192 At the bottom of the \u201cSelect\u201d list, the Related section shows related record types.<\/p>\n<p>For example, most record types have a Related record type. To select fields from a related record type, select field, and a new Select link appears.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/new-Select-link-appears.png\" alt=\"new Select link appears\" \/><\/p>\n<h2>Step-2: Specify the sort order<\/h2>\n<p>Follow the below steps to manage the order<\/p>\n<p>\u2192 Select Edit Columns to add\/remove columns and edit the columns in the Query search results.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Edit-Columns-to-add-and-remove-columns.png\" alt=\"Edit Columns to add and remove columns\" \/><\/p>\n<p>\u2192 Select \u201cConfigure Sorting\u201d to sort the columns and its view.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Select-Configure-Sorting.png\" alt=\"Select Configure Sorting\" \/><\/p>\n<p>\u2192 Specify the column to sort on, specify the sort order, and then select OK.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Configure-sort-order.png\" alt=\"Configure sort order\" \/><\/p>\n<p>\u2192 After selecting the options for \u201cSort By\u201d and \u201cThen By\u201d, select \u2018OK\u2019 to save the changes.<\/p>\n<h3>Step-3: Add additional columns to Advanced Find query<\/h3>\n<p>\u2192 In the \u201cAdd Columns\u201d window, you can click on the Add Columns to add additional columns to the Advanced Find query.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Advanced-Find-query.png\" alt=\"Advanced Find query\" \/><\/p>\n<p>\u2192 After selecting the columns from the list, click on the \u201cOK\u201d button to proceed further.<\/p>\n<h2>Step-4: Get \u2018Results\u2019<\/h2>\n<p>\u2192 Once you have your Advanced Find query complete, in the Advanced Find window, you can click on the red exclamation point (Results) to run the query.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/red-exclamation-point-Results.png\" alt=\"red exclamation point Results\" \/><\/p>\n<p>\u2192 By clicking on the \u201cResults\u201d, you will get the matched result records of the selected entity based on selected filters.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/selected-entity-based-on-selected-filters.png\" alt=\"selected entity based on selected filters\" \/><\/p>\n<h2>Step-5: Download FetchXML<\/h2>\n<p>\u2192 In the \u201cAdvanced Find\u201d window, you can click on the Download to download the FetchXml query.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/Download-FetchXML.png\" alt=\"Download FetchXML\" \/><\/p>\n<p><b>Downloaded query:<\/b><\/p>\n<p>\u2192 Once you download the fetch XML query, you can use it for WebAPI.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/w.indiaondesk.com\/crmjetty\/wp-content\/uploads\/2021\/06\/download-the-fetch-XML-query.png\" alt=\"download the fetch XML query\" \/><\/p>\n<p><em>All product and company names are trademarks\u2122, registered\u00ae or copyright\u00a9 trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.<\/em><\/p>\n<\/div>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In Dynamics 365 WebAPI, you can retrieve data using FetchXML queries for some complex requirements. Dynamics 365 WebAPI supports querying using \u201cFetchXML\u201d. With FetchXML, it can be easily generated using \u201cAdvanced Find\u201d. Advanced Find is a powerful feature in Dynamics 365 that can be used easily by literally any user without SQL query knowledge. It [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":5,"featured_media":1542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-2603","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-crm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create and Save FetchXmlQuery from Dynamics 365?<\/title>\n<meta name=\"description\" content=\"When it comes to configuring settings, you want a hassle free solution portal solution. Dynamics 365 customer portal from CRMJetty is one such solution.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create and Save FetchXmlQuery from Dynamics 365?\" \/>\n<meta property=\"og:description\" content=\"When it comes to configuring settings, you want a hassle free solution portal solution. Dynamics 365 customer portal from CRMJetty is one such solution.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/\" \/>\n<meta property=\"og:site_name\" content=\"CRMJetty\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-19T06:07:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-13T12:41:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.appjetty.com\/wp\/crmjetty\/wp-content\/uploads\/sites\/2\/2021\/02\/OG-How-to-Create-and-Save-FetchXmlQuery-from-Dynamics-365.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/#website\",\"url\":\"https:\/\/w.indiaondesk.com\/crmjetty\/\",\"name\":\"CRMJetty\",\"description\":\"Just another WordPress site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/w.indiaondesk.com\/crmjetty\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#webpage\",\"url\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/\",\"name\":\"How to Create and Save FetchXmlQuery from Dynamics 365?\",\"isPartOf\":{\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#primaryimage\"},\"datePublished\":\"2021-02-19T06:07:06+00:00\",\"dateModified\":\"2021-08-13T12:41:58+00:00\",\"author\":{\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/#\/schema\/person\/fd66bf9a3200a28fd5f2736a568acd92\"},\"description\":\"When it comes to configuring settings, you want a hassle free solution portal solution. Dynamics 365 customer portal from CRMJetty is one such solution.\",\"breadcrumb\":{\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/\",\"url\":\"https:\/\/w.indiaondesk.com\/crmjetty\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/how-to-create-and-save-fetchxmlquery-from-dynamics-365\/#webpage\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/#\/schema\/person\/fd66bf9a3200a28fd5f2736a568acd92\",\"name\":\"Maulik Shah\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/w.indiaondesk.com\/crmjetty\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bceb5291e50e7548d375046b11fdfd97b4707626da6a7d54e6ec5202034b0e60?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bceb5291e50e7548d375046b11fdfd97b4707626da6a7d54e6ec5202034b0e60?s=96&d=mm&r=g\",\"caption\":\"Maulik Shah\"},\"url\":\"https:\/\/w.indiaondesk.com\/crmjetty\/author\/contentadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/posts\/2603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/comments?post=2603"}],"version-history":[{"count":1,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/posts\/2603\/revisions"}],"predecessor-version":[{"id":2783,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/posts\/2603\/revisions\/2783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/media\/1542"}],"wp:attachment":[{"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/media?parent=2603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/categories?post=2603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w.indiaondesk.com\/crmjetty\/wp-json\/wp\/v2\/tags?post=2603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}