Check PO Req Amount vs. PO Req Limit - Workflow Event Handler

Use this event handler to automatically notify certain people when the cost of a purchase order requisition exceeds the PO requisition limit for the user who submitted the requisition. The notification can be an external e-mail and/or a message sent to the Inbox form for SyteLine users.

This is the text of the notification that is sent:

To: receipient
From: originator
Subject: Purchase Order Requisition amount exceeds user authorization
Body: Purchase Order Requisition reqnum amount reqamount is greater than 
the user's authorization of userreqamount. Please review the Purchase 
Order Requisition.

Variable Information

Variable Description
recipient For a SyteLine Inbox message, this is the SyteLine user name you specify in the Notify Users field on the Workflow Event Handler Activation form. You can specify multiple names separated by semicolons.

For an external e-mail, this is the e-mail address you specify in the E-mail Users field on the Workflow Event Handler Activation form. You can specify multiple names separated by a semicolons.

originator For a SyteLine Inbox message, this is usually the name of the SyteLine user who performed the action that generated the message.

For an external e-mail, this is usually the e-mail address associated with the SyteLine user who performed the action that generated the message.

However, if the user does not have an associated e-mail address in the Users form, or if the system cannot determine a user associated with the action, a default address or name is used. In some cases, this default is the e-mail address for the SMTP User Name associated with the intranet entered on the Site/Entities form for the site.

reqnum This is the number of the PO requisition that was added in the Purchase Order Requisitions form.
reqnum This is the number of the PO requisition that was added in the Purchase Order Requisitions form.
reqamount This is the value of the Requisition Cost field for the PO requisition that was added in the Purchase Order Requisitions form.
userreqamount This is the value of the PO Req Limit field on the Users form for the user who added the requisition.

Modifying the Event Handler

To change the subject or body of the message, see Modifying Workflow Event Handlers.

Technical Details

Global Constants

These global constants are created by the event handler, based on the entries you make in the Workflow Event Handler Activation form:

Global Constant Contains
CheckPurchaseOrderRequisitionAmountManagerID Contents of the Notify Users field
CheckPurchaseOrderRequisitionAmountManagerEmail Contents of the E-Mail Users field.

Associated Event and tableO

The event PurchaseOrderRequisitionAmountUpdate for the preq table triggers this notification.

 


Related Topics

About Workflow Event Handlers

Setting Up and Activating Workflow Event Handlers

Modifying Workflow Event Handlers