Add an event-based script to a field

Can I do this task?

More information: Form Scripting

  1. In the Navigation Pane, click Settings, click Customization, and then click Customize Entities.
  2. Open the entity and then click Forms and Views.
  3. Click Form, then on the Actions toolbar, click More Actions, and then click Edit.
  4. Select a field on the form.
  5. Click Change Properties.
  6. On the Events tab, select onChange, and then click Edit.
  7. In the Event Detail Properties dialog box, on the Details tab, select the Event is enabled check box to enable the event, and in the text box, enter the body of the script that you want to use when the selected event is run.
  8. On the Dependencies tab, in the Available fields list, select any fields you have referenced in scripts, and then click the Add Selected Records button Add Selected Records button to move the selected fields to the Dependent fields list.
  9. Click OK to close the Event Detail Properties form.
  10. Click OK to close the Field Properties form.
  11. Test your script in the three modes a form can be used: create, update, and read-only:
    1. On the Preview menu, click Create Form, Update Form, or Read-Only Form.
    2. For the create and update modes, enter data in the field and move focus off the field by selecting a different field to verify that the script executes.
    3. To close the Preview form, on the File menu, click Close.
  12. Click Save and Close to close the form.
  13. When your customizations are complete, publish your customizations:
    • To publish customizations for the entity you are currently editing, on the Actions Action menu button menu, click Publish.
    • To publish customizations for all entities at once, open the Customize Entities list. On the More Actions menu, click Publish All Customizations.
    • To publish customizations for specific entities, open the Customize Entities list and select the entities you want to publish. On the Actions toolbar, click Publish.

Important

Related Topics

Edit Entity Forms

Form Scripting

Customizing Entities

Configure Scripts for Form Events

Preview Form Customizations

Customizing Entities - Troubleshooting

Did you find the information that you need?
Yes      No 
If not, what information do you need? (optional)

© 2009 Microsoft Corporation. All rights reserved.