When you are writing reports for Microsoft Dynamics CRM, a common temptation is to use the base tables or non filtered views. it can be tempting to do this to make your report run faster. Before going this route, please consider what you are giving up:
- You have to grant the CRM service account a higher level of database access, which is not supported.
- You create a security back door–any report written against the base tables and views will not be constrained by CRM security. Users will have access to records outside of their normal record access levels.
- You give up the ability to use prefiltering.
- The report will not reflect user time zone or language settings.
- An upgrade may break your reports–just ask CRM 2011 users who had reports reading from the extension base tables.
Before opening up the barn door, please be sure you have exhausted all other optimization options:
- Eliminate unnecessary joins
- Use prefiltering, and set the filter to the desired data subset.
- Move your query to a stored procedure*
- Create a custom view*
* These options will require modification of database permissions to grant the CRM service account permission for the stored procedure or view; however, they are safer options than granting all users read access over all base tables or views.
[…] seems to be the week of unsupported tips. I know, we said it before: Swim between the flags, and Use filtered views even if you use stored […]