ToggleSampleFinalFlag Method
- Last UpdatedNov 06, 2025
- 2 minute read
The ToggleSampleFinalFlag() method updates the final and finalized_at fields of the specified sample record in the Sample table to set the final state of the sample. If the sample is being set to final, the finalized_by field will be set to the the user specified or, if one is not specfied, the currently logged in user. If the sample is being set as not final, the finalized_by field will be set to null. For a sample that is being set to final, the time at which the sample was finalized at can also be specified. If it's not, it will be set to the current time. If a sample is being set as not final, the finalized_at field will be set to null.
'Declaration
Public Shared Sub ToggleSampleFinalFlag( _
ByVal sessionId As Integer, _
ByVal sampleId As Integer, _
ByVal final As Boolean, _
ByVal finalizedBy As String, _
ByVal finalizedAt As Nullable(Of Date) _
)
public static void ToggleSampleFinalFlag(
int sessionId,
int sampleId,
bool final,
string finalizedBy,
Nullable<DateTime> finalizedAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- sampleId
- Required. Holds the ID assigned to this record when it is added. The sampleId parameter is used by other methods that modify or delete this type of record.
- final
- Required. Holds the value of the flag stating whether the sample is being finalized or changed from a final state.
- finalizedBy
- Optional. Holds the name of the user who finalized the sample.
- finalizedAt
- Optional. Holds the Local Date when the sample was finalized.