Tuesday, 2 October 2012

CRM Field Guide - The Review

Ok, so I've pretty much speed read the CRM Field Guide and I have to say, I'm very impressed with it after a first read. For me this is the kind of book that's been missing for a long time - a user guide, an installation guide, a "bet you didn't know CRM did this" guide, a "you're not doing development correctly until you've read this" guide! And want a little confession? 6 or 7 chapters in and I started to realize how much I didn't know about Dynamics CRM!

So a little breakdown on what this book offers. It leads you in with a gentle pat on the bottom by breaking down the interface for you, explaining what each section does or where each link takes you. It gives you just enough information to start on without scaring the living bejaysus out of you, and finishes off chapter 1 with a very solid list of tips from the MVPs themselves.

Next up you learn how to install it. You might say, isn't this the wrong way round? Shouldn't you tell me how to install it before taking me through the interface? Actually no, I think for once somebody has got it right. You get presented with "What CRM is" before you get unleashed with the beast (for lack of a better term). Even though it might seem like I'm pointing out a very simple thing I quite liked this approach, that much that I felt like pointing it out.

After a crash course in installing and using some out of the box features they take you on, well yet again, for lack of a better term, a semi deep-dive. (I really need to learn more terms apparently). They lift the hood a little on how to get the most out of this beast. From optimizing servers to troubleshooting common problems, they've covered it. It's actually quite impressive what they squeezed into this book without going over the top. It seems like they've covered 80% of CRM that most people use and not bothered with the rest. Apart from maybe a brief mention of a few bits if they are worthy of it.

By this stage I'm loving it. I'm getting a little insight into these MVP's heads and I'm not slowing up. I'm reading about processes, solutions and customization's and things are really beginning to hot up. Although, to be honest I'm generally just nodding my head in approval at this stage, because I imagine most CRM developers should already be practicing most of this stuff. But good stuff it is. Cue rapid development and I think to myself this is the bit I've been looking forward too. What approach do you take to customizing those entities and writing web resources? How do you guys organize, not just your CRM solutions, but your Visual Studio solutions and associated plugins and scripts? What coding tips and tricks can you share with us developers? Alas, this is unfortunately the one place that I find this book lacking a little. Granted, they share an abundance of links with you to get any of the information you require. But you left me wanting!

If I could add just 2 more chapters to this book it would be a JavaScript deep-dive and a Developers 101 to CRM.SLN. It didn't need to be overpowering, just some guides on attaching JavaScript events, writing HTML/Silverlight web resources and maybe a little crash course in VS plugins and custom workflow activities. Just a little bit of depth here would have made it a perfect book for me.

But don't let this deter you, as it is a very minor criticism. This is still one awesome book in my opinion. Even if it doesn't go to the technical level I felt it needed to in regard to development, this still is a must read for every developer, implementer and even every user of Dynamics CRM 2011. There's so many little things I have learnt from this book that will improve what I take to each implementation of CRM 2011 I tackle in the future. In short, this book will be a staple in my CRM diet for Dynamics CRM 2011.

All in all good work MVPs!

Monday, 1 October 2012

CRM Field Guide out today!

I started getting tweets thick and fast into my feed today in regards to the CRM Field Guide being released. I first spotted it on Larry Lentz's feed. I snapped up a copy pretty much immediately after spotting it's release, and just when I received the payment verification from Julie Yack www.crmfieldguide.com crashes. That's just about sums up how popular I expect this book to be! I noticed that crmfieldguide.com (without the www) still seems to be working, so you might be able to grab a copy from that link.

This book, in my opinion, is going to be one of the most popular CRM 2011 books released for the Microsoft Dynamics CRM platform bar none. It's a book written by MVPs in the CRM community for the CRM community and should become a staple part of any CRM 2011 developers/integrators/deployers diet. It looks like it will deal with just about everything from admin to development and pretty much everything in between that you can think about.

Anyway, I'm now left in a limbo of anticipation, because I cannot get onto the darn download page to get my new book, shucks! I may have to just be patient and wait until tomorrow! I sure am looking forward to that read though.

Good luck with the release guys!

Capitalize first letter of a text field in Dynamics CRM

This was asked on a the Dynamics community forum recently, and due to my struggles in posting Javascript as a response I ended up blogging about it instead!

So how do we do this? Firstly, we'll need a webresource that contains our javascript. Create a .JS file (in my example I'm going to call it test.js) and add the following function to it:

function firstToCaps(obj){
    var fieldVal = obj.getEventSource().getValue();

    var newFieldVal = fieldVal.charAt(0).toUpperCase() + fieldVal.slice(1);

Once you have your JS file saved just add that as a new webresource to your solution.

Next, let's discuss how you hook into an onchange event of a field on a form, because this is what we need to do in order to solve this problem. For this example I'm going to use the account form and the name field.

In our solution let's add the account entity to it. Open up the main form of the account and check out the Form Properties:

You'll notice I have added a library called "crm_tests.js" to the list of Form Libraries. You'll also notice that in the Event Handlers I have selected "Account Name" and "OnChange". This allows me to hook into this event and call a function when required. In my case I have added a call to my function "firstToCaps":

The important part of this event is that I have checked the option to pass the execution context as the first parameter. This gives me access to the field that fired the event.

So, let's go back to that function and take a quick look over what it does:

function firstToCaps(obj){
    var fieldVal = obj.getEventSource().getValue();

    var newFieldVal = fieldVal.charAt(0).toUpperCase() + fieldVal.slice(1);

You've probably put 2 and 2 together at this stage and can see I'm using the execution context "obj" and its function getEventSource to allow me to get and set the value of the calling field.

Save and publish all of that and watch your field auto capitalize!