Add Method (Cause)
- Last UpdatedNov 06, 2025
- 2 minute read
The Add() method adds a cause record to the Cause table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal causeDesc As String, _
ByVal causeGrpId As Integer, _
ByVal displaySeq As Integer, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditComment As String, _
ByRef causeId As Integer, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim causeDesc As String
Dim causeGrpId As Integer
Dim displaySeq As Integer
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditComment As String
Dim causeId As Integer
Dim lastEditAt As Date
Cause.Add(sessionId, causeDesc, causeGrpId, displaySeq, spare1, spare2, spare3, spare4, lastEditComment, causeId, lastEditAt)
public static void Add(
int sessionId,
string causeDesc,
int causeGrpId,
int displaySeq,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditComment,
out int causeId,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- causeDesc
- Required. Holds the description for the cause.
- causeGrpId
- Required. Holds the ID of the cause group to which the cause is linked.
- displaySeq
- Required. Holds the cause's display sequence number. The cause display sequence numbers are used to determine the order of causes when they are listed in the user interface.
- 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.
- lastEditComment
- Optional. Holds comments that describe why this record is being added.
- causeId
- Output. Holds the returned ID for the new cause.
- lastEditAt
- Output. Holds the returned date/time when this record was added. The lastEditAt parameter is used by other methods that modify or delete this record for optimistic concurrency control.