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.
Before you begin
If you add a permission hook to a field, you must 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.
Procedure
To add a field hook:
-
In the Schema Repository Explorer, expand the Record Types folder in
your schema and then double-click on a record type.
The record type editor opens.
- Click the Fields tab to view the
Record Fields grid.The Record Fields grid contains a column for each type of predefined field hook.
-
Click in the hook column for the desired field, click the down arrow, and then select .
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.
The editor that starts depends on the type of hook that you select. For example, if you click , the Perl Script editor starts. If you choose CONSTANT LIST, the Choice List window opens.
- Edit the hook.If you are not editing a global script, note that you can only add text between the
# Start User Codeand# End User Codetags. Any text entered outside of these tags will not be saved.The calling syntax for the hook is added to the script and cannot be edited.