CRM 2011 – JavaScript Cheat Sheet

Another fantastic post by one of the top CRM bloggers, there is some great CRM blogs this week, almost too many for me to read.

Daniel Cai hot on the heels of breaking the 50000 page views show us why his CRM blog is so popular by making a fantastic Javascript development Cheat Sheet and you can read about in this blog post

I know the Javascript changes have been probably the most confusing development change from CRM 4 to CRM 2011, the Microsoft team completely ripped up the old way of Javascript development which gave people quite a steep learning curve, with the bonus they couldn’t bring their CRM 4 code with them (you can but it won’t be supported for ever).  I know readers of this blog find it confusing because my blog post

CRM 2011 – Javascript xrm page basics

has been the most popular blog post for the last month.

CRM 2011 – Comparison between CRM 4.0 and CRM 2011 Javascript

has also been very popular and it has a good syntax example for the main CRM 2011 Javascript calls.

Now with Daniels new Javascript cheat sheet which you can get here

In his blog he also talks about the new changes and defends the new Javascript syntax by making two excellent points

  • The first motivation is really about the industry standard of JavaScript development. In CRM 4, we use syntax everywhere, which is really convenient. But it is actually against the best practice in JavaScript development, as this technique is not supported by any other browsers. You may think that CRM2011 is only supported by IE at this moment anyway, why would I care about any other browsers. You are right, CRM2011 is not a cross-browser application, but it doesn’t mean that is going to be the case forever. I am relatively confident that the next MSCRM will be a cross-browser one. In fact, I had a close look of some CRM 2011 JavaScript code the other day, I was under the impression that CRM team (probably part of the team) might have tried to make MSCRM 2011 a cross-browser one, but they didn’t make the cut for some reasons.

  • The new CRM 2011 library provides a lot more richer API than CRM4. So we shall require less hacking code if we can take full advantage of the new library, which makes our code more compatible with the future versions.

  • I agree with the two points made on Dan’s blog.  Initially it took me a while to understand the Javascript syntax and it was very frustrating because there didn’t seem to be much help in the SDK to start with.  The examples were too complex and the SDK didn’t give you much help understanding the syntax.

    I think now with the cheat sheet, Javascript basic entries on this blog and the examples on many other blogs, not to mention the SDK finally has pages on the subject, I think people should be able to easily get going with the Javascript changes in CRM 2011.  Once you are over the initial hurdle then the new syntax is straight forward.

    In fact the way the code has been separated is quite logical and the new code does adhere to Javascript standards.

    I don’t see any reason why people should be using and it’s worth making sure you don’t fall back in this easy way out because Microsoft will stop supporting this and you will find yourself having a tricky and boring upgrading task on your hands.


    5 thoughts on “CRM 2011 – JavaScript Cheat Sheet

    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out /  Change )

    Google photo

    You are commenting using your Google account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )

    Connecting to %s

    This site uses Akismet to reduce spam. Learn how your comment data is processed.