If you use the Marketing module of Microsoft Dynamics CRM you may have encountered the need to add a Lead, Contact, or Account to a marketing list via a workflow.  CRM doesn't natively support this capability so we created a custom workflow activity to solve the problem.

 

How It Works

Create a workflow that calls the Add to Marketing List solution, specifying the Marketing List and a link to the Lead, Contact, or Account that you are working with.

Consider this example:

  • You are running a marketing campaign on your web site regarding a new product you have developed.
  • You have created a workflow to execute when a new Lead is created. This workflow checks the Product Interest attribute found on the Lead form.
  • If the value of the attribute is that of the newly developed product, you want to add that Lead to the New Product Marketing List.
  • You insert a workflow step that calls Add to Marketing List, providing the Marketing List reference and the reference to the newly created Lead

For more information, visit the product page.

A demonstration version that runs on the Dynamics CRM Virtual PC is also available for download.

 

New Product Announcement: Round Robin Lead Assignment

On February 26, 2009, in Dynamics CRM, by Mitch Milam

We have just released the first of our commercial add-on products this week:

 

Round Robin Lead Assignment

This solution allows you to automatically assign new sales leads to a team of sales people. Once installed and configured, the only maintenance required is in the management of the membership a team with CRM

Read more about it here.

 

Visual Studio Icon Library

On February 24, 2009, in Development, by Mitch Milam

I just love accidentally finding valuable information. While looking for something totally different, I found this article by Sara Ford.

Starting in Visual Studio 2005, you’ll find the Visual Studio Image Library, a zip file that contains over a 1000 images to create applications that have a consistent UI look and feel to Windows, Office, and Visual Studio.

During the Visual Studio setup, the VS2008ImageLibrary.zip file is installed at \Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\

Judging from the comments on the article, I'm not sure many people knew this was there.

One of the cooler things included in the library are some of those animated icons you see on long operations such as moving, copying, and uploading files.   A few months ago, I probably spent a couple of hours browsing around the web for examples of those.

Thanks Sara.

 

Last Fall ( late Summer actually ), David Yack released an excellent book for CRM developers: CRM as a Rapid Development Platform.

David is a fellow MVP with an extremely high level of knowledge of the Microsoft Dynamics CRM platform.

The book covers all development aspects of CRM including:

  • Development best practices
  • Client-side development
  • ASP.NET and Silverlight extensions
  • Plug-ins and workflow assemblies
  • Performance tuning and troubleshooting

just to name a few.

More than a just a book about development, also included are assemblies and tools to enhance your development experience with Dynamics CRM ( downloadable from the web site, after you register ).

Think of the content of this book as the CRM SDK Part II.

If you are a developer working with Microsoft Dynamics CRM, you should have this book on your shelf.

 

 

If you've ever worked with CRM's Advanced Find you know what an amazing number of built-in date query parameters there are.  It turns out, that those query parameters have corresponding user-defined SQL functions that you can use in your own queries for operations such as custom reports.

Here is a list of some of the more common date functions:

fn_BeginOfDay
fn_BeginOfHour
fn_BeginOfLastMonth
fn_BeginOfLastSevenDay
fn_BeginOfLastWeek
fn_BeginOfLastXDay
fn_BeginOfLastXHour
fn_BeginOfLastXWeek
fn_BeginOfLastYear
fn_BeginOfMonth
fn_BeginOfNextMonth
fn_BeginOfNextWeek
fn_BeginOfNextYear
fn_BeginOfThisMonth
fn_BeginOfThisWeek
fn_BeginOfThisYear
fn_BeginOfToday
fn_BeginOfTomorrow
fn_BeginOfWeek
fn_BeginOfYear
fn_BeginOfYesterday
fn_EndOfLastMonth
fn_EndOfLastWeek
fn_EndOfLastYear
fn_EndOfNextMonth
fn_EndOfNextSevenDay
fn_EndOfNextWeek
fn_EndOfNextXDay
fn_EndOfNextXHour
fn_EndOfNextXWeek
fn_EndOfNextYear
fn_EndOfThisMonth
fn_EndOfThisWeek
fn_EndOfThisYear
fn_EndOfToday
fn_EndOfTomorrow
fn_EndOfYesterday
fn_FirstDayOfMonth
fn_LastXMonth
fn_LastXYear
fn_LocalTimeToUTC
fn_NextXMonth
fn_NextXYear
fn_NTDayOfWeek

If you would like to see these functions in action, copy the following script into SQL Management Studio and run it ( after connecting to the CRM database ):

 

select 'fn_BeginOfDay' as "Function",  dbo.fn_BeginOfDay(GetDate()) as "Value"
union
select 'fn_BeginOfHour',  dbo.fn_BeginOfHour(GetDate())
union
select 'fn_BeginOfLastMonth',  dbo.fn_BeginOfLastMonth(GetDate())
union
select 'fn_BeginOfLastSevenDay',  dbo.fn_BeginOfLastSevenDay(GetDate())
union
select 'fn_BeginOfLastWeek',  dbo.fn_BeginOfLastWeek(GetDate())
union
select 'fn_BeginOfLastXDay',  dbo.fn_BeginOfLastXDay(GetDate(), 1)
union
select 'fn_BeginOfLastXHour',  dbo.fn_BeginOfLastXHour(GetDate(), 1)
union
select 'fn_BeginOfLastXWeek',  dbo.fn_BeginOfLastXWeek(GetDate(), 2)
union
select 'fn_BeginOfLastYear',  dbo.fn_BeginOfLastYear(GetDate())
union
select 'fn_BeginOfMonth',  dbo.fn_BeginOfMonth(GetDate())
union
select 'fn_BeginOfNextMonth',  dbo.fn_BeginOfNextMonth(GetDate())
union
select 'fn_BeginOfNextWeek',  dbo.fn_BeginOfNextWeek(GetDate())
union
select 'fn_BeginOfNextYear',  dbo.fn_BeginOfNextYear(GetDate())
union
select 'fn_BeginOfThisMonth',  dbo.fn_BeginOfThisMonth(GetDate())
union
select 'fn_BeginOfThisWeek',  dbo.fn_BeginOfThisWeek(GetDate())
union
select 'fn_BeginOfThisYear',  dbo.fn_BeginOfThisYear(GetDate())
union
select 'fn_BeginOfToday',  dbo.fn_BeginOfToday(GetDate())
union
select 'fn_BeginOfTomorrow',  dbo.fn_BeginOfTomorrow(GetDate())
union
select 'fn_BeginOfWeek',  dbo.fn_BeginOfWeek(GetDate())
union
select 'fn_BeginOfYear',  dbo.fn_BeginOfYear(GetDate())
union
select 'fn_BeginOfYesterday',  dbo.fn_BeginOfYesterday(GetDate())
union
select 'fn_EndOfLastMonth',  dbo.fn_EndOfLastMonth(GetDate())
union
select 'fn_EndOfLastWeek',  dbo.fn_EndOfLastWeek(GetDate())
union
select 'fn_EndOfLastYear',  dbo.fn_EndOfLastYear(GetDate())
union
select 'fn_EndOfNextMonth',  dbo.fn_EndOfNextMonth(GetDate())
union
select 'fn_EndOfNextSevenDay',  dbo.fn_EndOfNextSevenDay(GetDate())
union
select 'fn_EndOfNextWeek',  dbo.fn_EndOfNextWeek(GetDate())
union
select 'fn_EndOfNextXDay',  dbo.fn_EndOfNextXDay(GetDate(), 1)
union
select 'fn_EndOfNextXHour',  dbo.fn_EndOfNextXHour(GetDate(), 1)
union
select 'fn_EndOfNextXWeek',  dbo.fn_EndOfNextXWeek(GetDate(), 1)
union
select 'fn_EndOfNextYear',  dbo.fn_EndOfNextYear(GetDate())
union
select 'fn_EndOfThisMonth',  dbo.fn_EndOfThisMonth(GetDate())
union
select 'fn_EndOfThisWeek',  dbo.fn_EndOfThisWeek(GetDate())
union
select 'fn_EndOfThisYear',  dbo.fn_EndOfThisYear(GetDate())
union
select 'fn_EndOfToday',  dbo.fn_EndOfToday(GetDate())
union
select 'fn_EndOfTomorrow',  dbo.fn_EndOfTomorrow(GetDate())
union
select 'fn_EndOfYesterday',  dbo.fn_EndOfYesterday(GetDate())
union
select 'fn_FirstDayOfMonth',  dbo.fn_FirstDayOfMonth(GetDate(), 10)
union
select 'fn_LastXMonth',  dbo.fn_LastXMonth(GetDate(), 1)
union
select 'fn_LastXYear',  dbo.fn_LastXYear(GetDate(), 1)
union
select 'fn_NextXMonth',  dbo.fn_NextXMonth(GetDate(), 1)
union
select 'fn_NextXYear',  dbo.fn_NextXYear(GetDate(), 1)

 

Joke of the day: Feb 16th, 2009

On February 16, 2009, in Meanderings, by Mitch Milam

The pastor asked if anyone in the congregation would like to express praise  for answered prayers. A lady stood and walked to the podium. She said, "I have a praise. Two months ago, my husband Tom had a terrible bicycle wreck, and his scrotum was completely crushed. The pain was excruciating and the doctors didn't know if they could help him."

You could hear a muffled gasp from the men in the congregation as they imagined the pain that Tom must have experienced.

"Tom was unable to hold me or the children," she went on, "and every move caused him terrible pain. We prayed as the doctors performed a delicate operation, and it turned out they were able to piece together the crushed remnants of Tom's scrotum and wrap wire around it to hold it in place."

Again the men in the congregation were unnerved and squirmed uncomfortably as they imagined the horrible surgery performed on Tom.

"Now," she announced in a quavering voice, "thank the Lord Tom is out of the hospital, and the doctors say that with time his scrotum should recover completely."

All the men sighed with relief. The pastor rose and tentatively asked if anyone else had something to say.

A man stood up and walked slowly to the podium.

He said "I'm Tom." The entire congregation  held its breath.

"I just want to tell my wife that the word is sternum."

 

I am curious how many of you who read this blog are interested in formal training for CRM development.  If you have a second, I'd love to get your opinion.

Thanks, Mitch

 

Mitch: 1, Cows: 1

On February 15, 2009, in Tall Tales, by Mitch Milam

Growing up in the country gives a person all sorts of interesting experiences and one of mine was raising cattle.  My Dad, being a farmer, needed something to keep himself busy with during the winter months that also offered an alternate stream of income.  By the time I had reached my teens, we had a small herd of about sixty of cattle.  We didn't have any horses and since the pasture was only around 100 acres, it wasn't usually a huge deal to herd them up on foot.

Occasionally, things got a little out of hand, and cows being cows, they don't do what you want them to, so some days were longer than others.

On one occasion, after chasing the cows around the pasture for what seemed like the entire day, I came just about as close as I've ever come to personally exploring the concept of an afterlife.

I had been chasing a small bunch of cows, trying to get them back into the main herd so they could be moved toward the corral.  I was carrying a small chunk of wood which I waved excitedly to help encourage the cows to run in the direction I wanted them to go.  I'm not sure it helped much but it was better than just flailing my arms about.  Things were not going well that day and at some point, the cows I was chasing just sort of scattered and I was left with just a single cow.

We were standing on tops of ridges between two gullies, about 30 feet apart just staring at each other.  Both of us so tired of running that it was all we could do to breath.  I guess she had grown tired of the stupid two-legged-human-people running them all over creation and otherwise spoiling a perfectly good day that could have been better spent chewing grass.  Since I was nearest two-legged-human-people she could find, I became the logical target on which to vent her anger.  And let me tell you, she was angry.  Downright pissed off.  At me.

After staring at me for a while, she made up her mind.  Dropping her head and making that pissed-off-cow sound that pissed-off-cows make, she plunged into the gully and ran straight at me.  It was about that time that I realized that Don and Martha's little boy was about to die.  If not totally dead, then at the very least, mostly dead.

It's kind of hard to reason with something that eats grass for a living and is now hell-bent on running you over and to be quite honest, that whole dead thing didn't appeal to me very much. In fact, it rightly pissed me off. 

Down her side of the gully, here she came; all red-eyed and pissed off and about to get herself one of them two-legged-human-people. So there I stood; chunk of wood in my hand, watching the world in slow motion, and trying to decide what to do next.  Without really even thinking, I took a step back, dug my right foot into what would become a firm batter's stance, and in a move that would have brought a tear to Coach Williams' eye, made me a target of that splash of white that was her forehead.

The cow made her way through the gully and up onto my ridge.  When she was just a handful of feet away from me, I swung with all of my strength and screamed, "You son of a…" WHACK!  The chunk of wood hitting her squarely in the forehead and shattering into dust.  After that, she just became this black blur that buzzed past me and on into the next gully.  I guess she was a bit stunned by the blow since she sort of wobbled up to the top of the next ridge.

It would not surprise me in the least if my scream wasn't heard all the way into town. I was really expecting my Dad to say something about me cursing, but nothing ever became of it.

Alan, one of the guys who worked for my Dad, later told me, "Man, if you'd had a baseball bat we'd all be eating steak tonight." 

As indeed we would.

That was the last time I had problems with that cow.  Oh, and I wasn't dead ( fully or partially ).  To this day, almost twenty-five years later, I can still see the scene as clearly as if it had happened this afternoon.  The only thing I was really ever thankful for was the fact that she didn't have horns.  Otherwise, the story would have had an entirely different ending.

The End

Copyright (c) 2009 by Mitch Milam

 

I ran into something unexpected this week at a customer site: Internal system jobs, like Matchcode Updates, stuck in with a waiting status.  For workflows, this usually means there are errors preventing the workflow from proceeding.  But, I've never seen it on internal jobs before.

After asking around, Mahesh at Microsoft pointed out a method for attaining additional information regarding the status of a System Job.  Follow these steps:

[ as a CRM Administrator ]

1) Select Settings, System Jobs to display a list of currently running or ran jobs.

2) Click the Advanced Find button and the following dialog will be displayed:

image

3) Click Edit Columns then add the column Message, as shown below:

image

This will display the actual status message and allow you to determine if a workflow or system job is waiting because it is supposed to, or if it is waiting because it encountered an error.

The following is a sample of system jobs – Matchcode Updates – that have failed because of an environmental change:

image

Note: The status is canceled because I manually canceled these jobs after I located and corrected the issue. Their normal status would have been Waiting.

This surely helped my troubleshooting.  I hope it helps yours.

 

A moment in history

On February 8, 2009, in Meanderings, by Mitch Milam

I was watching the History channel tonight and saw a show on the 761st Tank Battalion, which was the first all-Black tank battalion in the U.S. and a major contributor to the Allied efforts in World War II.

During the Battle of the Bulge, the 761st were engaged to support infantry troops. As one white solder put it:

"This tank showed up, and in the snow, the hatch opened and this black face popped up and he said, 'You all need some help?'"

And help they did provide.

I bring this up not because it is a race issue, in a time in which race was a tremendous issue, I mention it because of the tanker's comments.

Where else on Earth, but the southern United States, does God make men such as these -  white, black, or other – who, in the midst of utter chaos, can ask such simple statements, in such a calm manner?