Some of my customers use Microsoft Excel or Access to pull data from the CRM system in order to produce custom reports, or in one instance, to interface with a third-party bulk-email application.
CRM 3.0 has a set of SQL Database Views, called Filtered Views, that are constructed in such a way that CRM Security roles are maintained and you can retrieve nothing using one of these views that you would not ordinarily see while using the CRM application.
One aspect of using filtered views that you must take into consideration is the fact that all data ( that you have access to ) will be retrieved from the specified Entity. This means both Inactive and Active records.
If you don't take Inactive records into consideration your result set could be drastically different than what you expected and you may inadvertently expend resources on inactive customers.
Luckily, CRM provides two data fields that can be used to filter your query:
| SQL Column | Value |
| statuscode | 1 = Active
2 = Inactive |
| statuscodename | Active
or Inactive |
So, here is how you would use the above:
This code instructs SQL Server to return all rows where the statuscode is equal to 1, which is an Active Account or Contact.
4 Responses
abdullah
18|Jan|2008 1Hi
What is the difference in Views and Filtered View??
mitch
18|Jan|2008 2Filtered Views are accessed directly from SQL. Views, in CRM terminology, are a view of the data from within the CRM user interface.
Ricerca nelle viste anche degli Accounts inattivi « Marcello Tonarelli Blog
27|Apr|2008 3[...] http://blogs.infinite-x.net/2006/09/07/using-filtered-views-with-crm-30/ [...]
Maria
08|May|2008 4Why use statuscode instead of statecode? Is there any difference between the two (i.e. can one show "active" while the other shows "inactive")?
Leave a reply
Search
Categories
Archives
Meta
Most Viewed
Tags