Approve Employee Injury Report Created - Workflow Event Handler

Use this event handler to automatically notify certain SyteLine users when an employee injury report is created using the Employee Injuries form. The message also prompts for a Yes/No response to approve the report. Based on the response, the event handler sends an approval or rejection notification to the originator. Both notifications are messages sent to the SyteLine Inbox form.

This is the text of the notification that is sent:


To: receipient
From: originator
Subject: New Employee Injury Report
Body: Employee empnum, empname has reported an injury on injurydate with 
the Days Lost lostdays and restrictions restrict.  Please review and 
indicate your approval on the Response tab.
Question: Do you approve this new Injury Report? 
Choices: Yes and No.
	

If the response is Yes, this message is sent to the originator's SyteLine Inbox:


To: originator
From: receipient
Subject: Employee Injury Report approved
Body: Injury report for Employee empnum, empname on injurydate has been 
approved. 

If the response is No, this message is sent to the originator's SyteLine Inbox:


To: originator
From: receipient
Subject: Employee Injury Report rejected
Body: Injury report for Employee empnum, empname on injurydate has been 
rejected. 

Variable Information

Variable Description
recipient This is the user name you specify in the Notify Users field on the Workflow Event Handler Activation form. You can specify multiple names separated by semicolons.
originator This is usually the name of the user who performed the action that generated the message.

However, 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 SMTP User Name associated with the intranet entered on the Site/Entities form for the site.

empnum This is the number of the employee who reported an injury.
empname This is the name of the employee who reported an injury.
injurydate This is the Injury Date shown on the Employee Injuries form.
lostdays This is the value in the Days Lost field on the Employee Injuries form.
restrict This is the value in the Restrictions field on the Employee Injuries form.

Global Constants

This global constant is created by the event handler, based on the entries you make in the Workflow Event Handler Activation form:

Global Constant Contains
NewEmployeeInjuryReportApproverID Contents of the Notify Users field

Associated Event and IDO

The event IdoOnItemInsert for the SLEmpInjuries IDO triggers this notification.