Add an event-based script to a form

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. In the Common Tasks area, click Form Properties.
  5. On the Events tab, click onSave or OnLoad, and then click Edit.
  6. 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.
  7. 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.
  8. Click OK to close the Event Detail Properties dialog box.
  9. Click OK to close the Form Properties dialog box.
  10. Test your script in the three modes a form can be used: create, update, and read-only:
  11. Click Save and Close to close the form.
  12. Click Save and Close to close the entity.
  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.