Tuesday, April 26, 2011

Fixed: Microsoft Dynamics CRM 2011 Jscript Won't Debug, Just Errors!

I ran into an annoying error in Microsoft Dynamics CRM 2011 the other day. It wasn't a big thing but was a pain to figure out and something I can see anyone accidentally doing, so I thought it warranted a blog post.  It seems that I have a strong desire to put opening and closing parenthesis in my Jscript "Function" field for my event handler definitions like this.

If you do this your function won't run.  You can put in "debugger;" statements and it still won't run, nor will it catch your breakpoint.  The preview screen blows up completely.

The solution: Just remove the opening and closing parenthesis from the "Function" name specified above.  It should look like this:

There, now it's all fixed! :)

No comments:

Post a Comment