{"id":101,"date":"2011-05-30T05:58:00","date_gmt":"2011-05-30T05:58:00","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=101"},"modified":"2011-05-30T05:58:00","modified_gmt":"2011-05-30T05:58:00","slug":"how-to-get-the-total-results-returned-record-count-for-a-given-query","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2011\/05\/how-to-get-the-total-results-returned-record-count-for-a-given-query\/","title":{"rendered":"How to get the Total Results returned Record Count for a given query"},"content":{"rendered":"<p>In CRM2011 it is now possible to get the Total count of records returned by a query using Fetch XML.<\/p>\n<p>Using Query expression:<\/p>\n<p>You can set the ReturnTotalRecordCount property to True.<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/-fqdhEMEZ96U\/TeM2lgWO5qI\/AAAAAAAAAyQ\/73AgsoO5Pkw\/s1600\/30%2Bmay.jpg\"><img decoding=\"async\" border=\"0\" alt=\"\" src=\"http:\/\/2.bp.blogspot.com\/-fqdhEMEZ96U\/TeM2lgWO5qI\/AAAAAAAAAyQ\/73AgsoO5Pkw\/s400\/30%2Bmay.jpg\"><\/a><\/p>\n<p>Using FetchXml:<\/p>\n<p>You can set the same property as shown below.<\/p>\n<p><fetch mapping='logical' count='10' returntotalrecordcount='true'><br \/><entity name='account'><br \/><attribute name='accountid' \/><br \/><attribute name='accountnumber' \/><br \/><attribute name='address1_city' \/><br \/><attribute name='address1_telephone1' \/><br \/><attribute name='name' \/><br \/><order attribute='name' \/><br \/><filter><br \/><condition attribute='address1_city' operator='like' value='a%' \/><br \/><\/filter><br \/><\/entity><br \/><\/fetch><\/p>\n<p>This can be helpful to show Record 1 of <totalcount>kind of status labels.<\/p>\n<p>Hope this helps!<\/totalcount><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In CRM2011 it is now possible to get the Total count of records returned by a query using Fetch XML. Using Query expression: You can set the ReturnTotalRecordCount property to True. Using FetchXml: You can set the same property as shown below. This can be helpful to show Record 1 of kind of status labels.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2011\/05\/how-to-get-the-total-results-returned-record-count-for-a-given-query\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[19],"tags":[794],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm","tag-fetch-xmlquery-expression"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}