Adding a JavaScript file to a JavaScript policy

You can use the Add JavaScript File wizard to add a JavaScript file to a JavaScript policy. The JavaScript file will apply to an attribute in a source entity in the service. After you add the file, you can use an editor to add an expression to the file.

To add a JavaScript file to a JavaScript policy:

  1. From the Data Project Explorer, expand the Services folder and then open the service request that contains the service plan with the policy.
  2. Double-click the Service Plan node. The service plan editor opens.
  3. In the Target Policies list, select the JavaScript policy. The JavaScript Policy editor opens.
  4. Click Add JavaScript. The Add JavaScript File wizard opens.
  5. Complete the steps of the wizard.

    You must select an attribute to which the JavaScript file will apply, and enter a file name.

    After you complete the wizard, an editor will open.
  6. Use the editor to enter a JavaScript expression in the file.
  7. Click File > Save to save the file. The file will be listed in the JavaScript Policy editor and stored in the Other Files folder in the Data Project Explorer.