0
votes

I an new to both Dynamics CRM (Hosted) and LINQ, so please forgive my ignorance with this question...

I need to access some data stored in the CRM, but have no idea how to get at it. Normally I would open my SQL Management software and look around for the data, but I cant do that with the Hosted CRM data.

So.... My question is, is there anyway to visualise the 'database' to find the data I need to recal ???

Thanks in advance.

3
What do you mean by visualise? Download to disk?James Wood
@jamesWood I mean to see a reprentation of the tables, records, data. I have no idea how/where the relevant data is stored in terms of the table, or the column names. As explained in my OP in a typical SQL DB I would just open my EMS SQL Manager software and have a look at all that.Phill Healey
Well thats kind of what CRM is, whats the end goal, to just see the data?James Wood
I need to display a list of active members on a website which integrates with CRM and runs on the ADX Portal platform. SO essentially I need to pull out a set of membership data, presumably using LINQ.Phill Healey

3 Answers

1
votes

If you want manipulate the data of a CRM 2011 instance is necessary to follow some rules.

For CRUD and business operations you need use the CRM 2011 web services (also in combination with LINQ)

Is also possible (if you can connect to the DB) to read the data from Filtered Views, a Filtered View is a view mapped on a standard CRM entity (for example to read the data from the entity Account you can use the view FilteredAccount)

Read or modify the data directly from the tables is not supported.

If you want to know the structure of the entities you can use the Customization area inside CRM, or install the Metadata Browser (a solution available inside the CRM 2011 SDK) to see the attributes and the relationships.

A good starting point is always the CRM 2011 SDK, you can download here:

http://www.microsoft.com/en-us/download/details.aspx?id=24004

Inside you will find many examples (if you want to use LINQ check the early-bound ones) and the assemblies and tools for development.

1
votes

Download the SDK and import the Metadata Browser managed solution (\sdk\tools\metadatabrowser\metadatabrowser_2_0_0_0_managed.zip) into your CRM Live instance.

You could also try downloading the database schema for the out-of-the-box database setup. Not really optimal but it might work for you.

You could also install a local version of Dynamics CRM (say in a virtual machine) for testing (either via MSDN or the free trial download.) This will give you SQL access to the database.

I recommend going with the Metadata Browser, which will probably get you the information that you need. Since the Metadata Browser is a managed solution you can install and remove it without impacting the Default Solution or any other solution in the organization.

0
votes

Actually it turns out it is possible to work with the Dynamics CRM Online 'database' in much the same way as you can with any number of SQL Manager tools.

Linqpad4 - allows you to work with a number of environments and write your queries in VB, C# and even SQL.

It looks like a great tool, and has already helped me greatly, it certainly makes the Dynamics / LINQ scenario much easier to explore and learn about.

LinqPad4 can be downloaded here: [http://www.linqpad.net/]

and the driver(s) for Dynamics CRM can be downloaded here: [http://archive.msdn.microsoft.com/crmlinqpad]

I strongly recommend it.