Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 64797

Microsoft Dynamics CRM Business Rules – Who Needs Required Fields?

$
0
0

With Microsoft Dynamics CRM necessity can definitely be the mother of invention. And using Microsoft Dynamics CRM Business Rules can help with the invention part . . .

We have a lot of happy clients. One of those clients sells a product suited to physicians in a niche market. It makes sense for them to categorize a physician which they have done business with as a Contact and those they haven’t yet done business with as a Lead. CRM 101 -- right?

Here comes the necessity

Our client often needs to gather information regarding forecasted surgical cases that could be captured at the Lead or at the Contact level. Much like the out of the box behavior for CRM that allows you to specify either an Account or a Contact as a Customer, our client needs to be able to select either a Lead or a Contact as they record their forecasted information. Pretty sure CRM doesn’t have a special system field that will let you do that!!

We’ve got to get both those lookups on the form and figure out how to guide the User into filling one in -- and only one. And, do it in a manner which is both simple and cost effective for our client.

Is this the mother part or the invention part?

You have to understand that my boss advocates above all else we take "care of our customers" and "keep things simple whenever possible". There are no doubt ways to use jscript to make sure that only one and not both -- Lead or Contact -- gets populated on the Case Forecast form. I’m not a developer so I started thinking about whether I could use jscripts simpler cousin -- Business Rules -- in some way.

Along those lines I had an epiphany! When you use required fields to enforce your data entry, CRM alerts you when you are missing data via error messages. Business Rules can have messages too. Error messages, but messages nonetheless.

I thought I’d at least futz around with it a bit to see if I could get the job done without getting our Developer involved. Yes, jscript is more elegant but there is no shame in using the tools you have out of the box -- right?

Getting their attention

So it didn’t take long to figure out that one way I could do this would be to throw an error message at the User right away. In the scenario for this particular client, we start out on load of the form with both the Lead and the Contact blank – why not yell at the User right there and let them know they better not even THINK about saving the form without providing a value for one or the other. ☺

 

Business Rules to the rescue:

Microsoft Dynamics CRM Business Rules 1

It looks like this to the User (note that the message does temporarily cover up the Contact label and lookup control):

Microsoft Dynamics CRM Business Rules 2

The User can’t save the record until they populate one of the fields. Once they do, we figured it would great to hide the other field so they can’t put data in both. We added a little bit more logic to the rule:

Microsoft Dynamics CRM Business Rules 3

 

Is there a moral to this story?

You bet. CRM is like a Swiss Army Knife. Lots of tools in the box and even better, there is no rule that says you can’t try to use one of the tools in a different way than it was originally intended. You can do it too. Use Microsoft Dynamics CRM Business Rules to do things simpler, faster and with less expense than using jscript. Saved our client time and money. Oh, the client liked that!

By John Clifton, Microsoft Dynamics CRM Consultant with xRM³, a Microsoft partner specializing in Dynamics CRM consulting, implementation, integration and Microsoft Dynamics CRM administrative services. Based in San Diego County Southern California.

 

The post Microsoft Dynamics CRM Business Rules – Who Needs Required Fields? appeared first on CRM Software Blog.


Viewing all articles
Browse latest Browse all 64797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>