Add Method (PoLine)
- Last UpdatedNov 06, 2025
- 3 minute read
The Add() method adds a new purchase order line item record to the PO_Line table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal poId As String, _
ByVal poLineNo As Integer, _
ByVal itemId As String, _
ByVal vendorItemId As String, _
ByVal quantity As Double, _
ByVal uomId As Nullable(Of Integer), _
ByVal minQuantity As Nullable(Of Double), _
ByVal maxQuantity As Nullable(Of Double), _
ByVal linePrice As Nullable(Of Double), _
ByVal requiredByLocal As Nullable(Of Date), _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditComment As String, _
ByRef lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim poId As String
Dim poLineNo As Integer
Dim itemId As String
Dim vendorItemId As String
Dim quantity As Double
Dim uomId As Nullable(Of Integer)
Dim minQuantity As Nullable(Of Double)
Dim maxQuantity As Nullable(Of Double)
Dim linePrice As Nullable(Of Double)
Dim requiredByLocal As Nullable(Of Date)
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditComment As String
Dim lastEditAt As Nullable(Of Date)
PoLine.Add(sessionId, poId, poLineNo, itemId, vendorItemId, quantity, uomId, minQuantity, maxQuantity, linePrice, requiredByLocal, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Add(
int sessionId,
string poId,
int poLineNo,
string itemId,
string vendorItemId,
double quantity,
Nullable<int> uomId,
Nullable<double> minQuantity,
Nullable<double> maxQuantity,
Nullable<double> linePrice,
Nullable<DateTime> requiredByLocal,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditComment,
out Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- poId
- Required. Holds the ID of the purchase order.
- poLineNo
- Required. Holds a number that identifies the line in the purchase order.
- itemId
- Required. Holds the ID of the item being ordered.
- vendorItemId
- Optional. Holds the ID used by the vendor to identify the item being ordered.
- quantity
- Required. Holds the nominal amount of the item being ordered.
- uomId
- Optional. Holds the ID of the unit of measure for the item. If supplied, this ID will override the item's nominal unit of measure from the Item table.
- minQuantity
- Optional. Holds the minimum quantity that, once shipped, will allow the order to be completed. If null is supplied, the value defaults to the quantity value.
- maxQuantity
- Optional. Holds the maximum quantity that can be shipped against this line item. A null value indicates no limit.
- linePrice
- Optional. Holds the total price for this line item.
- requiredByLocal
- Optional. Holds the date when the goods for this line are required in the local time of the entity to which the goods are shipped, specified by the ship_to column in the PO's record. If a ship-to entity is not specified, the default time zone will be used to determine the local time.
- 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 describes why this record is being added.
- 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 type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.