O'Reilly logo

Microsoft Dynamics CRM 2011 Scripting Cookbook by Nicolae Tarla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debug messages

All modern browsers will prompt you when your scripts are not correct. The problem is, sometimes, these messages are not necessarily the most accurate or correct. For that reason we create debug messages at certain key points in our code that can be returned. This way we can easily identify what part of our code has executed, and where we are getting stuck.

JavaScript makes a few methods available to us, some more helpful than the others in certain situations, to insert our own custom debug messages.

One option we have seen before in some of the scripts we worked on already is using an alert. This brings up a pop-up message for the user. This approach, while easy to follow, is quite disruptive if we are testing a longer script, as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required