removeEmployeeRateHistoryByFilekey() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Preferred Method
  9. Alternate Methods
  10. Related Methods

Function

  • Removes an employee’s existing rate history records within the defined date range

Syntax

  • AeXMLBridge.removeEmployeeRateHistoryByFilekey(Filekey, MinDate, MaxDate);

Parameters

  • Integer - employee filekey
  • String - begin date (yyyy-mm-dd format)
  • String - end date (yyyy-mm-dd format)

Return Value

  • None

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int filekey = 1234;   
// using employee with filekey 1234

string minDate = DateTime.Now.AddDays(-180).ToString("yyyy-MM-dd");
string maxDate = DateTime.Now.ToString("yyyy-MM-dd");
// set date paramters

try
{
ws.removeEmployeeRateHistoryByFilekey(filekey, minDate, maxDate);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
Dim filekey As Integer = 1234
' using employee with filekey 1234

Dim minDate As String = DateTime.Now.AddDays(-180).ToString("yyyy-MM-dd")
' set date paramters
Dim maxDate As String = DateTime.Now.ToString("yyyy-MM-dd")

Try
ws.removeEmployeeRateHistoryByFilekey(filekey, minDate, maxDate)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • The system will always maintain at least one rate of pay entry for each employee
  • To view complete, history, set the date parameters to an empty string

Possible Errors

  • Unable to locate employee with filekey
  • yyyy-mm-dd required (Date supplied in invalid format)

Preferred Method

removeEmployeeRateHistoryByIDNum

Alternate Methods

removeEmployeeRateHistoryEntry

extractEmployeeRatePayTypeAssignmentByIDNum
getEmployeeTransferRatesByIDNum
removeEmployeeRateHistoryByIDNum

Back to Top