Adding field hooks

You can add field hooks to customize the behavior of fields by providing such features as choice-lists, field validation, default values, and permissions.

About this task

If you add a permission hook to a field, adjust the values for that field in the Behaviors grid. The permission hook does not work unless the field behavior is set to USE_HOOK.

To add a field hook:

Procedure

  1. In the Workspace, expand Record Types, select and expand a record type, and double-click Fields. The Fields grid contains a column for each type of predefined field hook.
  2. Click in a hook column for the desired field; then click the down arrow and select Scripts > BASIC or PERL. If Instant Editing Mode is enabled, the appropriate script editor starts. If Instant Editing Mode is disabled, you must double-click the cell to start the editor.

    Which editor starts depends on the type of hook you select. For example, if you click SCRIPTS > BASIC, the Basic Script editor starts. If you choose CONSTANT LIST, the Choice List window opens.

  3. Edit the hook. Its calling syntax is added to the script and cannot be edited.
  4. Click Hooks > Compile to verify that your scripts are error free. Any errors are displayed in the Validation pane at the bottom of the Workspace.
  5. Close the script editor.