Record Count Snapshot?

I need to create a chart in CRM that gives me the record count of a particular entity over time. Most likely in weekly segments.

When I was all-offline, I had a handy SQL script that would take a record count of a table every week, and dump that and the date recorded into another table.

What would be the best methodology in CRM, do you think?
Who is Participating?
Feridun KadirPrincipal ConsultantCommented:
This is, I think, not a simple problem to solve. I can't think of anything within CRM that can do this. If you have CRM on-premise then, as you have found, can use SQL statements to query the size of tables.

The only way that I can think of is to create a new entity, say Record Count, to store the record counts, perhaps with a field for the name of the entity you are counting, eg. contacts, a whole number field for the count and a date field to store the date of the count. You will need an external program to query CRM for the record count and to write the result to a Record Count. You can use the Windows task scheduler to run the program on a regular basis.

You'll need to work with someone who is experienced in writing code for CRM. I think you should use FetchXML for this as per this article:
samschadAuthor Commented:
Thank you so much.  Your advice is certainly a start, and knowing that this functionality isn't something that can be hardcoded into CRM is good to know.  Before hiring a coder, I think I'll simply have to create the entity and enter values by hand for a while.  But I'll check out that article, for sure.  

Thank you!
Feridun KadirPrincipal ConsultantCommented:
No problem. Actually the URL is this one

The one above links back to this question!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.