submitTimeOffRequestMess() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Alternate Methods
  8. Related Methods

Function

  • Submits an employee’s time off request and send an email notification

Syntax

Return Value

  • None

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
TAeTimeOffRequest request = new TAeTimeOffRequest();

request.BenefitID = 1;
// use getBenefitsSimple() if you do not know the BenefitID value

request.EmpID = "1234";
// using employee with ID 1234

request.RequestTimeOffTYpeEnum.rtoOneDay;
// taking one day off

request.Hours = 480;
// hours in minutes (hours * 60)

request.StartDate = DateTime.Now.AddDays(10).ToStrin("yyyy-MM-dd");
// hard code date if you know it

TAeTimeOffRequestNotfification notify = new TAeTimeOffRequestNotification();
notify.BodyText = "Enter your body test here";
notify.SubjectLine = "Enter Subject Line here";
notify.eMailAddr = "Enter employee's email address here";
notify.Notify = true;

string url = "http://www.attendanceondemand.com";

try
{
ws.submitTimeOffRequestMess(request, notify, url);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Dim request As New TAeTimeOffRequest()

request.BenefitID = 1
' use getBenefitsSimple() if you do not know the BenefitID value

request.EmpID = "1234"
' using employee with ID 1234

request.RequestTimeOffTYpeEnum.rtoOneDay
' taking one day off

request.Hours = 480
' hours in minutes (hours * 60)

request.StartDate = DateTime.Now.AddDays(10).ToStrin("yyyy-MM-dd")
' hard code date if you know it

Dim notify As TAeTimeOffRequestNotfification = New TAeTimeOffRequestNotification()
notify.BodyText = "Enter your body test here"
notify.SubjectLine = "Enter Subject Line here"
notify.eMailAddr = "Enter employee's email address here"
notify.Notify = True

Dim url As String = "http://www.attendanceondemand.com"

Try
ws.submitTimeOffRequestMess(request, notify, url)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Use getBenefitsSimple to retrieve a list of benefit values if needed
  • Need to set either EmpID or Filekey value within the TAeTimeOffRequest structure
  • Not supplying a StartDate will default it to 12/30/99
  • Not supplying a BenefitID will default it to zero
  • his method is used when a custom email notification to the supervisor(s) is required upon submission of a new leave request
  • The linkback parameter is used to specify a link to be included in the notification email. This allows the recipient to be returned to a screen displaying the request

Alternate Methods

submitTimeOffRequest
submitTimeOffRequestEx

approveCancelLeaveRequestEntry
approveCancelLeaveRequestEntryMess
approveLeaveRequestEntry
approveLeaveRequestEntryEx
approveLeaveRequestEntryMess
denyCancelLeaveRequestEntry
denyCancelLeaveRequestEntryMess
denyLeaveRequestEntryEx
denyLeaveRequestEntryMess
describeLeaveRequestEntry
empCancelLeaveRequestEntry
empCancelLeaveRequestEntryMess
empRemoveLeaveRequestEntry
empRemoveLeaveRequestEntryMess
extractEmployeeLeaveRequest
extractEmployeeLeaveRequestsByIDNum
extractEmployeeLeaveRequestHist
extractLeaveRequestsByState
extractTimeOffRequestStates
leaveRequestIsCancelable
leaveRequestIsRemovable
removeLeaveRequestEntry

Back to Top