removeEmployeeRateHistoryEntry() Method

Table of Contents

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

Function

  • Removes an employee’s rate entry

Syntax

  • AeXMLBridge.removeEmployeeRateHistoryEntry(UniqueID);

Parameters

Return Value

  • None

Sample Code

C#

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

TAeRateAssignment[] rates = ws.getEmployeeRateHistoryByFilekey(filekey, "", "");
// return every rate history record since date range is blank

if (rates.Length > 1)
// cannot remove only rate history
{
try
{
ws.removeEmployeeRateHistoryEntry(rates[0].UniqueID);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

VB.Net

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

Dim rates As TAeRateAssignment() = ws.getEmployeeRateHistoryByFilekey(filekey, "", "")
' return every rate history record since dates are blank

If rates.Length > 1 Then
' cannot remove only rate history

Try
ws.removeEmployeeRateHistoryEntry(rates(0).UniqueID)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If

Remarks

  • You cannot remove an employee’s rate if they only have one rate entry

Possible Errors

  • Unknown Unique ID

extractEmployeeRatePayTypeAssignmentByIDNum
getEmployeeTransferRatesByIDNum
removeEmployeeRateHistoryByIDNum
removeEmployeeRateHistoryEntry

Back to Top