SetChunkPendingReason(Int32,String,String,Int32,Int32,DBInt,DBString) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The SetChunkPendingReason() method sets the first part of the pending reason for the specified entity, and splits off the portion of the current pending reason to a different reason.
This overload of the method uses a site name and entity name to specify the entity.
public static void SetChunkPendingReason(
int sessionId,
string entName,
string siteName,
int logId,
int finalReasCd,
DBInt duration,
DBString comments
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entName
- Required. Holds the name of the entity whose pending reason code is being set and split off.
- siteName
- Optional. Holds the site name of the entity whose pending reason code is being set and split off.
- logId
- Holds the log ID of the current utilization event to split off to a different event.
- finalReasCd
- Holds the final reason code to replace the pending reasons on this entity for this utilization event.
- duration
- Optional. Holds the duration that represents the portion of the pending utilization event. The duration cannot exceed the duration of the pending event. If it does, the stored procedure raises an error and prevents the modification of the pending event. If a null is passed, then the entire duration of the specified event is updated with the new reason code.
- comments
- Optional. Holds additional information for the new reason.
This method first extracts the existing utilization event from the Util_History table. If the supplied duration does not exceed the duration of the existing utilization event, then:
- The existing event, specified by the supplied log ID, is updated with the supplied (new) reason code.
- A new event is created, with an event start time of the existing event start time + duration and with the event end time of the existing event. All of the event properties from the existing event are copied to the new event.