QuestionQ422

Extend the user experience

You are a Dynamics 365 developer working on a model-driven app.

You add a button to an entity form and to that entity’s view that invokes a JavaScript function. Selecting the button causes an error.

You determine that the JavaScript function calls another JavaScript function in a separate web resource.

You need to fix the error.

What should you do?

  • A In the JavaScript web resource, add the missing web resource as a dependency.
  • B Add &ribbondebug=true to the app URL and run the Command Checker tool.
  • C From the Ribbon Workbench, add the missing JavaScript web resource as a CustomRule in EnableRules.
Explanation

A JavaScript web resource can declare another web resource as a dependency. In a model-driven app, dependent web resources are loaded together with the primary JavaScript web resource, including when that primary script is registered for a ribbon command. Configuring the missing JavaScript web resource as a dependency therefore makes the called function available.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!