Wednesday, September 26, 2007

Creating custom views for MS CRM 3

Any modification made to the main or META-database is considered unsupported customization. Not very strange, since you never know what new fields or tables Microsoft might add to the database.

Sometimes, however, especially when working with reports, it can be useful to create your own views that aggregate data to your needs. Adding a view to the CRM database might be the easiest and you will probably be ok as long as you are a bit careful when naming the view. However, you don't have to do it this way. You can also create a new database on the same server and create your view in this database. To be able to access the views (and if you still want to play unsupported, tables), just add the database name in front of the viewname. For instance:

SELECT * FROM MyCompany_MSCRM.dbo.SystemUser;

The "dbo" part doesn't have to be there but is added by the view creator GUI, so I left it there to avoid any misunderstandings.

Unfortunately, the "Add Table" function in the GUI doesn't support selecting views from other tables even though it is supported in the database.

As far as I know, it is also possible to connect to a view in a database on another server. I don't know how this is done and don't really see the relevance from a MS CRM 3 perspective, but if I find out how, I will let you know.


1 comment:

  1. This information is quite useful ...sir..Hope we can find more n more....very nice with example