Sunday, August 29, 2010

MSCRM: Obtaining the Total Record count of an entity

Would you like to know the total record count of a View Listing without paging through 250 records at a time? Here is one way to accomplish this – Create a custom report. Use the built-in Microsoft CRM Report Wizard to create a report to display the record count. This report is then available in the corresponding CRM entity's view or form record. Plus, it supports filtering (like Advanced Find) to drill down on the record counts dynamically.

Following are the steps to create a report that gets the total # of contacts:

1. Create a new custom attribute "Total Count" type "nvarChar". This field is not going to be use for any data storage - just for grouping the contacts together to easily display the total count. Alternatively, you can use an existing "nvarChar" attribute that is not being used for storing any data.

2. Create a new Report. Workplace >> Report >> click "New".

3. Click on the "Report Wizard" button to create the new report via the Report Wizard

4. Select "Start a new report" and click "Next"

5. Give the report a name "Contact Records Count"

6. Clear all the initial report's filtering criteria.

7. Select the "Total Count" field created in step 1 .above for the initial grouping. Note: Be sure to select "Count" for "Summary type".

8. Select some columns to display. Since we are mainly interested in the total record count, only one display column is needed.

9. Select "Table only" and click "Next"

10. By default, this report will be accessible in all the related Contact areas. Save the report.

The "Contact Records Count" report is now available in any Contact's view or Contact's record form to show you the total records count. . The "Not Specified (Count: #)" displays the total count.

No comments: