Quite often developers complain about getting javascript errors when the form does not contain any scripts or events. Explicit script definitions are not the only source of the possible errors:
- Business Rules are deployed on the client as generated javascript. While it’s unlikely that business rules will generate an erroneous script, it’s worthwhile disabling the rules and see if the problem goes away. For CRM Online you can check the scripts generated using Business Rules Viewer at http://xrm.tools.
- If the form contains html web resources, those resources can load scripts that interact with the form:
An HTML web resource may interact with the Xrm.Page or Xrm.Utility objects within the form
- Application and entities ribbons can load javascript resources as part of the action definition. You can check the presence of the commands by inspecting the ribbons using Ribbon Workbench. Note: if you entity does not have any ribbon definitions, it’s not a get our of jail free card. Third-party managed solutions can add their own command definitions to the ribbons and they won’t appear as part of your entity customizations. Hunting down those is a hit and miss exercise, vendor documentation and visual inspection of the ribbons and comparing them with the default ones is a good start.
Did we miss anything? Tell us at jar@crmtipoftheday.com.