Using triggers to customize behavior

Perforcetriggers are user-written programs or scripts that are called by a Helix Core whenever certain operations (such as changelist submits, changes to forms, attempts by users to log in or change passwords) are performed. If the script returns a value of 0, the operation continues; if the script returns any other value, the operation fails.

Triggers allow you to extend or customize Perforce functionality. Consider the following common uses:

For simplicity’s sake, this guide refers to trigger scripts and programs as triggers.


If the API level is 79 or greater, canonical filetypes are now displayed by default for all commands that display filetypes. If the API level is 78 or lower, filetype aliases are displayed instead. If your script depends on the display of filetype aliases, you will need either to change the API level or to change your script.