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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.