Using the Custom Alert Functions
The createalert function creates a custom alert, and the postalert function posts the alert. The createalert function can be called from a script or from a workflow. The postalert function must be called from a workflow. See Creating and Posting Custom Alerts from Within a Workflow.