UpdateEvent Method
- Last UpdatedNov 06, 2025
- 3 minute read
The UpdateEvent() method updates selected columns of the specified utilization event record in the Util_History table. This method can include updated start and end times for the event.
'Declaration
Public Shared Sub UpdateEvent( _
ByVal sessionId As Integer, _
ByVal entityId As Integer, _
ByVal existingEventTimeUtc As Date, _
ByVal newEventTimeUtc As Nullable(Of Date), _
ByVal newEventEndTimeUtc As Nullable(Of Date), _
ByVal reasonCode As Integer, _
ByVal reasonPending As Nullable(Of Boolean), _
ByVal comments As String, _
ByVal rawReasonCode As String, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal category1 As String, _
ByVal category2 As String, _
ByVal category3 As String, _
ByVal category4 As String, _
ByRef recordsAffected As Nullable(Of Integer) _
)
'Usage
Dim sessionId As Integer
Dim entityId As Integer
Dim existingEventTimeUtc As Date
Dim newEventTimeUtc As Nullable(Of Date)
Dim newEventEndTimeUtc As Nullable(Of Date)
Dim reasonCode As Integer
Dim reasonPending As Nullable(Of Boolean)
Dim comments As String
Dim rawReasonCode As String
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim category1 As String
Dim category2 As String
Dim category3 As String
Dim category4 As String
Dim recordsAffected As Nullable(Of Integer)
UtilHistory.UpdateEvent(sessionId, entityId, existingEventTimeUtc, newEventTimeUtc, newEventEndTimeUtc, reasonCode, reasonPending, comments, rawReasonCode, spare1, spare2, spare3, spare4, category1, category2, category3, category4, recordsAffected)
public static void UpdateEvent(
int sessionId,
int entityId,
DateTime existingEventTimeUtc,
Nullable<DateTime> newEventTimeUtc,
Nullable<DateTime> newEventEndTimeUtc,
int reasonCode,
Nullable<bool> reasonPending,
string comments,
string rawReasonCode,
string spare1,
string spare2,
string spare3,
string spare4,
string category1,
string category2,
string category3,
string category4,
out Nullable<int> recordsAffected
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entityId
- Required. Holds the ID of the entity whose utilization event is being updated.
- existingEventTimeUtc
- Required. Holds the date/time in UTC for the start time of the utilization event that is being updated. This parameter, along with the entity ID, is used to identify the event record.
- newEventTimeUtc
- Optional. Holds the new start date/time in UTC for the utilization event.
- newEventEndTimeUtc
- Optional. Holds the new end date/time in UTC for the utilization event.
- reasonCode
- Required. Holds the code that identifies the reason for the utilization event.
- reasonPending
- Optional. Holds a flag that indicates whether or not the reason is pending and needs to be finalized.
- comments
- Optional. Holds text to describe the event.
- rawReasonCode
- Optional. Holds the code that identifies the raw reason that is used to determine the utilization reason.
- spare1
- Optional. Holds the contents of the user-defined spare1 field.
- spare2
- Optional. Holds the contents of the user-defined spare2 field.
- spare3
- Optional. Holds the contents of the user-defined spare3 field.
- spare4
- Optional. Holds the contents of the user-defined spare4 field.
- category1
- Optional. Holds a user defined field that describes category1.
- category2
- Optional. Holds a user defined field that describes category2.
- category3
- Optional. Holds a user defined field that describes category3.
- category4
- Optional. Holds a user defined field that describes category4.
- recordsAffected
Output. Holds the number of records affected.