Mitch Milam's Dynamics CRM Discussions

Knowledge found and lost while working with Microsoft Dynamics CRM
RSS icon Home icon
  • Windows Azure: Setting the Web Role as Your Startup Project

    Posted on February 8th, 2010 mitch Print Print No comments

    I was faced with an interesting problem and the end of last week that caused me to spend way too much time troubleshooting.

    A Windows Azure solution is a collection of projects with your Cloud Project being the top and most important.  If you’re creating a web site, you’ll have at least one Web Role project that is, for all intents and purposes, an ASP.NET web site.

    This is where things went rather wrong.  We added a Silverlight project to our solution and about the same time, the Startup Project for the solution changed from the Cloud project to our Web Role.

    What does that mean to the average developer?  Well, it turns out that “it depends” is the answer.

    If your Cloud project is not set as the Startup Project then your application may or may not properly launch the Azure Development environment.  I say may because I found that some things worked, or at least didn’t report an error, while other things reported errors that may no sense at all.

    Specifically, I was receiving the following error when I attempted to insert a message into a queue:

    ConfigurationSettingSubscriber needs to be set before FromConfigurationSetting can be used

    For one, this error message is incorrect.  It is actually the ConfigurationSettingPublisher that has the issue. I did not get an error on code concerning the use of the ConfigurationSettingPublisher, I actually received the message when I attempted to connect to a queue.

    I had copied the code exactly from a perfectly functioning demo application that is part of the Windows Azure Platform Training Kit.  But it still didn’t work in my project.

    Finally, after much time and troubleshooting I happened to notice that our Web Role was set as the Startup Project which, it turns out, is a bad thing.

    Bill Lodin has an article where he mentions this and is the one that finally led me down the path to finding and fixing my problem.

    I reset the Startup Project to our Cloud project and we’re back in business.

    I just wish Microsoft had made the errors a little clearer.

    Note: Microsoft just released version 1.1 of the Azure SDK so I’ll install it to see if anything has changed.

    Azure, Development
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    24 views
  • Really Cool Technology: Nike Application Shows Off Windows Azure Features

    Posted on February 4th, 2010 mitch Print Print No comments

    If you have a few minutes and have loaded Microsoft Silverlight, you need to check out the following site by Nike: www.jumpman23mosaic.com

    Use the zoom control on the right side of the page to zoom in.

    Here is some background:

    [ Via Bruce D. Kyle ]

    Check out www.jumpman23mosaic.com. It’s a five gigapixel “social mosaic” of photos of Air Jordan shoes submitted by fans.

    Windows Azure currently supports the following two types of roles:

    • Web role: A web role is a role that is customized for web application programming as supported by IIS 7 and ASP.NET.
    • Worker role: A worker role is a role that is useful for generalized development, and may perform background processing for a web role.

    Fans submit photos of their shoes online. Then every ten minutes Azure worker roles create a profile of new photos. The code inside the worker role looks at the colors in the user-submitted picture to decide where is the “right place” in the mosaic for the photo.

    Azure Web roles work on the front end in collaboration with Silverlight Deep Zoom.

    Azure, Development
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    111 views
  • Disabling all fields within a Section

    Posted on February 2nd, 2010 mitch Print Print 2 comments

    Last week I encountered a need to disable all of the fields within a Section on a CRM Form.  While you can set the properties individually, that is a waste of effort and a maintenance nightmare.

    After a bit of digging, I found the following post on one of the CRM newsgroups by Kyaw Kyaw Tun, from http://www.pulsesync.com:

    var section = crmForm.all.new_attribute_c.parentElement.parentElement.parentElement;
    
    for (i = 0; i < section.all.length; i++)
    {
        section.all[i].Disabled = true;
    } 

    You replace new_attribute with the name of an attribute that resides inside the section you wish to disable.

    Note: That _c is not a mistake, that needs to be part of the attribute name.  For instance, to hide the section containing accountnumber, you would use accountnumber_c.

    Though the magic of the JavaScript Document Object Model ( DOM ), we’ll get a list of all of the fields and set their Disabled property to true.

    Customization, Dynamics CRM
    1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
    Loading ... Loading ...
    221 views
  • New Nuts and Bolts Article Released: Outlook Synchronization in Microsoft Dynamics CRM 4.0

    Posted on February 1st, 2010 mitch Print Print No comments

    The Microsoft CRM E2 team is pleased to announce the release of the Nuts and Bolts article Outlook Synchronization in Microsoft Dynamics CRM 4.0, which is available for download from the Microsoft Download Center at:
    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2d497348-0a10-40ce-8edb-b0ee85f1215e

    Outlook synchronization enables Outlook users to view Dynamics CRM information, including contacts, tasks, phone calls, letters, faxes, appointments, and e-mails, within the Outlook interface. This document describes the client synchronization process that is associated with Update Rollup 7 for Microsoft Dynamics CRM 4.0 or later (for on-premise deployments) and with Microsoft Dynamics CRM Online November 2009 Service Update or later (for online deployments).

    Dynamics CRM, Outlook Client
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    137 views
  • Error message when you try to save a record in Microsoft Dynamics CRM 4.0: "Object reference not set to an instance of an object"

    Posted on January 27th, 2010 mitch Print Print No comments

    http://support.microsoft.com/kb/954018

    I ran into this issue again this week and since it had been so long since I had seen it, it took me a while to remember the solution- which I thought I’d share with you know.

    Problem

    You receive the following message when attempting to save a record:

    Object reference not set to an instance of an object.

     

    Cause

    This problem occurs because a money attribute is created for the entity. When you do this, Microsoft Dynamics CRM 4.0 creates an exchangerate attribute to work together with the money attribute. The money attribute is published as part of the entity.

    However, if you delete the money attribute, the exchangerate attribute is not removed. Therefore, when you try to run a Microsoft Dynamics CRM plug-in, the plug-in can find the exchangerate attribute. However, the plug-in cannot find the money attribute

     

    Solution

    Create a new money attribute on the entity.  This attribute will remain unused and does not need to be on the form.

     

    Comments

    Seeing this error is rare.  It occurred in my instance because another developer originally added a field as a money type then realized it wasn’t actually money, it was a float type.  He deleted and recreated the attribute which inadvertently create the problem.

    Dynamics CRM
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    251 views
  • Using CRM workflow to overcome laziness, I mean, become more efficient

    Posted on January 22nd, 2010 mitch Print Print 1 comment

    CRM workflow can be used for all sorts of interesting things and can sometimes help you do your job in a surprising number of ways.

    Let’s take the following example as a “surprising” way.  I have entered some sample data, but after I entered the data, I realize that I really didn’t make most of the records verbose enough to be useful, as you can see from the following screen shot:

    image

    I now have two choices: Edit by hand all of the single-word records or come up with some fancy bulk editing technique to get the work done for me.

    Let’s go with option number two and see where we end up.

    What Won’t Work

    I can’t use the bulk edit feature because I want all of my records to be different.

    I also don’t want to edit them by hand, as mentioned above.

    Finally, I don’t want to write any code because that would be a real waste of my time.

    How about a Workflow?

    Have you ever considered using workflows for editing?  No?  Well then, let’s give it a shot.

    Step 1: Create the workflow

    This is pretty basic workflow at this point.  We have given the workflow a name and selected the entity, which is a custom entity called News.

    We’re using CRM Online so the Scope defaults to Organization.

    Finally, we will be executing this workflow manually so we want to clear all of the check boxes except for On demand.

    image

    Step 2: Add a workflow step

    Now we need to add an Update step to our workflow.  In this step, we will be updating both the Headline attribute and the Body attribute, as you can see below:

    image

    If you look closely at what we’re updating we are adding new text into each field then we are adding the field to itself.  Huh?  Will that work?  You bet.

    Here is what is happening ( using the Headline attribute as an example ).  We are actually performing the following calculation:

    “This is important news headline number “

    +

    [the existing contents of Headline]

    Which results in something like:

    This is important news headline number one.

    We then perform a similar calculation on the Body attribute.

    After publishing our workflow, we can put it to use.

    Step 3: Executing the workflow

    After returning to our News View, we need to select all of the News records that need to be updated.  When you click run workflow button, the following dialog will appear:

    image

    You need to click OK to select the workflow then OK again to run actually it.

    Step 4: Viewing our results

    After waiting a short amount of time for the workflows to execute, we can then refresh the News view and see the results of our handiwork:

    image

    Is that not cool or what?

    Conclusion

    So what did you think?  Does that open up your eyes a little as to the possibility of using workflow to edit data?

    And how long did it take?  Less than two minutes. And that is with me taking screen shots and pasting them into Windows Live Writer so I could write this article.  Since it was only two fields, I could have actually done the whole thing in less than a minute if I was really trying.

    Good luck with your own workflow efforts.

    Dynamics CRM, Workflow
    1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
    Loading ... Loading ...
    338 views
  • New survey posted: What CRM feature interests you the most?

    Posted on January 21st, 2010 mitch Print Print 5 comments

    Since it’s the beginning of a new year, I thought I would again check to see what people are interested in this year.

    If you have a minute, I’d love to hear what you have to say.

    The survey is located on the upper-right side of this blog.

    Thanks, Mitch

    Dynamics CRM
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    491 views
  • Useful Tools for Working with Windows Azure Storage

    Posted on January 21st, 2010 mitch Print Print 1 comment

    I wanted to make quick note of two tools that I’ve found invaluable during my recent development efforts.

    Cloudberry Explorer for Windows Azure Blob Storage

    Allows you to manage your Windows Azure blob storage using a Windows Explorer-like interface:

    It’s very useful should you wish to create blob containers or quickly move large files from your file system to Windows Azure.

     

    Windows Azure Management Tool (MMC)

    This is an Windows MMC snap-in that allows you to manage both Windows Azure Blobs and Queues.

    WindowsAzureMMC3.png

    This tool is indispensible for creating and monitoring Azure Queues.

    Azure, Development
    1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
    Loading ... Loading ...
    236 views
  • Working with Azure Queues: Learning things the hard way.

    Posted on January 20th, 2010 mitch Print Print No comments

    There are times when I do something so stupid that I feel the need to share with everyone, just to reinforce the point that I don’t need to do it again. :) 

    Today would be one of those days.  Here is what I did:

    I was working on my new web site which uses a Windows Azure Queue as a Message Processing System.  Basically I drop a specifically formatted string into a queue and a Azure Worker Role retrieves the message and processes it based on the contents.

    I was adding a new message type today it it wasn’t being processed.  Not because the message wasn’t being decoded properly, because the message was never being seen.

    What the heck, over?  It’s worked for the past two weeks, what would make the messages just disappear from the queue or maybe not be added?

    Well, after wasting about 30 minutes tracing the message through the system, I realized what I was doing wrong ( and where the stupid part comes in ).

    Since my site is still under development I haven’t broken the internal mechanisms into Development and Production versions.  I do, however, have Development and Staging version of my application running on Azure.

    And that was the problem.

    I was running my site locally but pointing to the Cloud instances of my storage.  Every time I placed a message in my queue, either the Production instance or the Staging instance would see the new message and process it.  The last part of processing involves deleting the message from the queue.

    Since two other instances of my site were running, by the time my local instance woke up to look at the queue contents, one of the other instances had already processed it.  This made me think things were not working.

    Anyway, note to self: Make sure the instance of the application you are working on is in sole control of any assets required to properly build and test it

    Azure, Development
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    166 views
  • CWR Mobility Ships Clients for Microsoft Dynamics CRM for BlackBerry, iPhone and Windows Mobile

    Posted on January 20th, 2010 mitch Print Print No comments

    CWR Mobility has released version 4.2 of its flagship product CWR Mobile CRM which includes a native mobile CRM client for BlackBerry and iPhone.

    Read the full article here.

    Dynamics CRM, Mobile
    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
    243 views