More About This Website

All information is provided "AS IS" with no warranties, and confers no rights

Login
Powered by Squarespace
Tuesday
May262009

Entity Framework Model to Dynamics CRM

I’ve been interested in a while to try to see if I could take a model from Entity Framework and push it into CRM using the Metadata API.  If your not familiar with ADO.NET Entity Framework, it was first released with .NET 3.5 SP1 and the second version of it is part of the upcoming VS2010/.NET 4 release.  You can separate out EF into two key parts the Entity Data Mode (EDM) and the Entity Framework API that’s used to work with the data using the EDM.  In working on my upcoming Silverlight book (http://www.slria.com) I’ve been looking at some different techniques for working with data across both traditional databases and CRM.  That seemed like the perfect excuse to spend a few minutes (ok a little longer than that) building a tool that would consume the Entity Framework Model and push it into a CRM Entity Model using the metadata API.

So to get started, I defined an EDM using the Course database that I’m using as part of my examples for the book.  The following is a snippet from the designer view of the EDM inside Visual Studio.  Wouldn’t it be nice if the CRM team provided us some modeling tools like this! 

image

Under the covers this stores in a .edmx file in your project which is really an XML file that contains the Conception Layer (What your application sees), the Storage layer (What it looks like in your database) and finally the Mapping layer which glues the two other layers together.  You could simply work with the XML but the Entity Framework provides a nice metadata API that you can load this up and walk through it in memory. 

Using the EF metadata API, I built a tool below to allow you to select entities from the model and push them to CRM.  The tool is still industrial, and very much a prototype at this point but once you select the entities it allows you to push both the entity and the attributes into CRM

 

image

It handles some basic things like putting in spaces in the names etc.  I still need to look more about descriptions and other useful things you might want to pull over but the basics end up in CRM.  The following is a simple snapshot of CRM after running the tool.

image

I’m thinking this type of capability could be interesting for a number of things.  In my example, I think it took about 10 minutes or so to do what would have taken me probably 5 hours to create all the duplicate definitions in CRM.  It might also be interesting to go the other way from CRM into the EDM to allow visualization of the CRM model inside Visual Studio.  I didn’t tackle that tonight, will save that for another day!

Saturday
Apr182009

New CRM 4 Virtual Machine Available

Microsoft just posted a new demonstration virtual machine to the PartnerSource portal.  This new Microsoft Dynamics CRM 4 Virtual Machine 2009 will replace the current one that is set to expire soon.  This new image has a lot of great improvements – top of my list is that it has Visual Studio 2008 and SQL Server 2008 on it!  It also has all the CRM 4 Accelerators, dashboards and other good stuff on it.

Currently, as far as I can tell you can only download the image from PartnerSource and there’s not a replacement in the public Microsoft download section yet.  Let’s hope Microsoft continues to support getting broad access to kick the tires on CRM and updates the public download.

The new VM is time bombed for August 2010.

Did you know about VM Express?  Apparently I didn’t , that is I have heard people talk about it, but just assumed they were using some fancy word for File downloads.  It turns out it’s really a Virtual Machine Demonstration Toolkit.  Anyway, apparently it’s this thing you can “Order” for a few $ (Yeah I don’t get that part) from the partner site that will make managing VM downloads etc easier.  Menno has a good blog post here that try’s to explain the “Magic”.  It also includes the “Magic” instructions needed to navigate the ordering process which without trust me you will NEVER find it on the site!  If your wanting to know if it’s any good – your guess is as good as mine, I placed my order and waiting for my package to arrive!

I did not wait however for it to arrive to download the new VM!

Tuesday
Mar102009

Could not find a Public, Static field with name 'xyz' of type DependencyProperty

When building custom workflow activities for CRM 4.0 pay attention to the names you give the dependency properties or you might just end up with this error.

Let’s look at a quick example of a dependency property

public static readonly DependencyProperty ResultProperty = DependencyProperty.Register
            ("Result", typeof(string), typeof(MyWorkflowType));

        [CrmOutput("Result")]
        public string  result
        {
            get
            {
                return (string)base.GetValue(ResultProperty);
            }
            set
            {
                base.SetValue(ResultProperty, value);
            }
        }

The part to pay attention to above is highlighted in red.  The code will compile fine but when you attempt to register it with CRM using the registration tool you will receive an exception.  The error will say “Could not find a Public, Static field with name “resultProperty” of type DependencyProperty.

Why’s this happen?  It appears that during registration MSCRM does a validation to ensure that you have a dependency property.  It expects the case of the name to be the same.  So in this case it wanted ResultProperty to be resultProperty with a lower case “r”.

Thursday
Mar052009

Workflow triggered by Update in error

Ran across an interesting error this week where a workflow was being triggered during an update even though the fields that were setup to trigger it were not modified.   I thought I was actually needing to have my eye’s checked but sure enough ,  the workflow would run 7 times retriggering itself, then the 8th time fail due to CRM detecting an infinite loop.

The good news is it’s curable, there’s a hot fix for this specific issue you can read about here

Thursday
Mar052009

Outlook and Diags Hang if AccessMode Administration

Was looking at a problem today for someone where Outlook wouldn’t install.  Diagnostics failed miserably or actually just hung part way through.   Turns out this can occur if the user is set to Access Mode = Administration instead of being set to a full user.  Simply changing the access mode for the user will correct this problem.

Thursday
Dec182008

Do you know who your DE is?

Shan McArthur has a good post up about the value of getting to know your Microsoft Developer Evangelists.   I often get asked the question – How do I get into beta’s, how do I get better info on what’s coming out.  The answer can be found on the following link!

Check out his post here.

Friday
Nov282008

Black Friday Book Sale

Not wanting to miss the boat on the American tradition of big sales the day after Thanksgiving I was able to convince the keeper of the magic discount codes to create one good for Friday, Saturday and Sunday!

Use “Black Friday” in the discount code at checkout and you will get the book (print copy) for about 50% off the list price or $50.00 plus shipping. 

Go now and order , because I didn’t ask how many that code will work for! http://www.thecrmbook.com

Saturday
Nov012008

CRM Services as part of Azure

At PDC this week Microsoft announced their new cloud service platform Azure Services Platform.  This new offering will run in the Microsoft Data Center’s featuring an O/S in the cloud plus several services sitting on top to act as building.  The goal is to provide services that can be leveraged by applications.  These can be consumed at the lowest lever using simply compute power by doing things like hosting an ASP.NET application in the cloud.  Additionally, there are building block services that site on top of the Windows Azure base and provide application developers common services they can leverage when building applications.

Examples of these services are SQL Services, Live Services and .NET Services.  .NET Services for example provides a service bus that can be leveraged to build connected applications.  By connected, I’m talking applications connected across organizations using the cloud to host the service bus. From a CRM perspective this ability to integrate as well as combine external service offerings as part of the CRM open up a lot of new opportunities. I plan to spend a decent amount of time exploring and trying to share ideas around the use of the new cloud capabilities and CRM so stay tuned!

Where it gets real exciting is when you look at what makes up the new Azure Services platform (see diagram below).  There are two building block services that I think you will find very interesting Microsoft SharePoint Services and Microsoft Dynamics CRM Services.  While not available yet in the CTP of Azure that was released, these elaborate on strategy Microsoft is evolving to recognize the broader ability of both these products beyond things like simple CRM.  You will also notice CRM is on the slide twice, once as a finished service CRM Online and again as a building block service.  I believe over time we will continue to see further distinction and separation of the pure “CRM” type functions from the core capabilities the product has today that can be more broadly leveraged.  I further believe that the following is the first step by Microsoft towards making that happen.

The idea is developers will be able to use SharePoint and CRM capabilities and choose a deployment model of on-premise or in the cloud.  Let me explain that another way looking at the capabilities that both of those offer a developer.  SharePoint excels at managing and facilitating collaboration of unstructured data like documents.  It also has a slew of capabilities to make it a good portal or gateway to enterprise data  CRM on the other hand, excels at managing connected or related data where you have more structured business data like a contact or an account.  But even more important is the fact that using the same capability to relate other business data.  This could be operational data like project tracking information, or product information like a real estate property.  Regardless, we should avoid getting hung up on the CRM acronym because in reality the CRM capabilities are really a layer built on top of the CRM platform core that has much broader applicability.

By leveraging these two core products, developers are able to achieve a level of abstraction from having to compose plumbing using raw services like Workflow, SQL and such.  These services are already “glued” together when using CRM and SharePoint as the foundation.

This story is far from over, in fact in many ways I think we are just heading into a period of evolution as the new services take shape and we can think about new applications that in the past would have been considered to challenging to attempt.

Page 1 ... 3 4 5 6 7 ... 21 Next 8 Entries »