Open the text file and view details regarding the error message.If there is a compile issue with the JavaScript code, you will see a message like below:.A message will now show the website name in the alert: Step through the code and note you can zoom over the variables to see the data: Save and publish the code, and reload the page.Var ws = (“websiteurl”).getValue() Īlert (“The website ” + ws + ” has changed.”) Now, add some more code to get the website field on the page:.From here you can step into the code, debug etc. ![]() This will enable the debugger breakpoint to be hit by the developer tools: Instrumenting your scripts Capturing session output PowerShell debugging features The PowerShell debugger Command line debugging Debugging PowerShell. Go to the website field and change the website.Click F12 to bring up the developer tools.Save and publish the changes, then refresh the Accounts form.This will tell the browser to debug at this point: debugger Open the WebsiteChange function and add the line below. From here, we can debug the JavaScript on the form.Go to the Accounts form and enter a new account.The field properties should now look like below.Enter the function within the library as WebsiteChange, the function created above. Change the Library drop down to select the new_WebsiteChange libarary.With Website->Change selected, go to the Events tab and click Add to add a new library:.Here we have some JavaScript that displays an alert. Enter in information regarding the new script.We will add a new library and a new function to that library. Under Events->Form Libraries click add.Note the name of the website field – websiteurl:.Firstly, edit the Accounts form to display the developer view:. ![]() We will do this on the Website field on the Accounts form: In this example, we will show a message box when a user changes a value on a field. I find this less intrusive to debugging than having to click through to the internet options screen, your mileage, however, may vary.One of the benefits of using Dynamics CRM is the ability to write client side JavaScript code to perform actions on the user interface. Let’s go through an example of how to do this. The one caveat however, is that you need to click on two confirmation boxes: Simple, but effective! I actually have a custom toolbar on my Windows 7 desktop that links right to here, to make them even easier to access: "Error Dlg Displayed On Every Error"="yes" "Error Dlg Displayed On Every Error"="no"Įnable Script Debugging.reg: !1526&parid=B06529FD3FC75473!134 ![]() To save a few clicks to make my life easier, I’ve created two registry files to turn this option on and off, you can see them below, along with the contents of the file below if you would rather just copy and paste it into your own. To change this option in IE, you are required to go to Tools > Internet Options > Advanced > scroll down to Browsing, and check or uncheck this option. While it is not the end of the world, it can be a few tedious extra clicks to enable and disable this as it is needed, as with IE9, it does not have the small icon with the Error on page text in the task bar like it did in previous versions, that will just allow you to click on it and view the error. If you develop for websites, such as SharePoint, you probably are often enabling and disabling the Display a notification about every script error in Internet Explorer (especially version 9) often when testing and debugging JavaScript code in sites (see image below for reference).
0 Comments
Leave a Reply. |